Record summary

CVE-2023-2868 has a selected CVSS score of 9.4 (critical); EIP currently links 1 catalogued exploit and 4 repository PoCs. CISA lists CVE-2023-2868 in KEV.

Description

A remote command injection vulnerability exists in the Barracuda Email Security Gateway (appliance form factor only) product effecting versions 5.1.3.001-9.2.0.006. The vulnerability arises out of a failure to comprehensively sanitize the processing of .tar file (tape archives). The vulnerability stems from incomplete input validation of a user-supplied .tar file as it pertains to the names of the files contained within the archive. As a consequence, a remote attacker can specifically format these file names in a particular manner that will result in remotely executing a system command through Perl's qx operator with the privileges of the Email Security Gateway product. This issue was fixed as part of BNSF-36456 patch. This patch was automatically applied to all customer appliances.

Description source: CVE List

Exploitation context

Known exploitation

CISA KEV
Listed · May 26, 2023 · CISA
VulnCheck KEV
Listed · May 18, 2023 · VulnCheck
Reported exploitation
Observed · VulnCheck

Available material

Catalogued exploits
1
Repository PoCs
4

CISA SSVC decision

ExploitationActive
AutomatableYes
Technical impactTotal

CISA Coordinator · SSVC 2.0.3 · Evaluated Jan 16, 2025 · Source: CVE List

Affected products and versions

2
ProductSourceVersion rangeStatus

Default status: unaffected

CVE List5.1.3.001 to < 9.2.0.006affected
CISAVersion data not supplied

Proofs of concept

5

Catalogued exploits

MetasploitBarracuda ESG TAR Filename Command InjectionMetasploit exploitby Curt Hyvarinen +2 moreExploit1 file

Ruby

Metasploit

PoC details
Analysisdeepseek-v4-pro:cloud ·

Technical assessment

A Metasploit module that exploits CVE-2023-2868, a command injection vulnerability in Barracuda Email Security Gateway. It sends an email with a specially crafted TAR attachment whose filename contains backtick-wrapped shell commands, achieving remote code execution when the ESG processes the attachment.

Backdoor review

No backdoor observed in reviewed code

The module is a standard Metasploit exploit for CVE-2023-2868. It constructs a TAR file with a malicious filename containing backtick-wrapped payload commands and delivers it via SMTP. No concealed backdoor, deceptive payload, or operator-directed harm was observed. The code performs only the documented exploit behavior.

ClassificationExploit
Model confidence100%
AuthenticationNot required
LanguagesRuby
Target softwareBarracuda Email Security Gateway
Attack typescommand injectionremote code execution
Evidence & reasoningClassification basis · observed behavior · safety review
Technical evidence

Classification basis and observed behavior

Classification basis

The module is a complete exploit that actively delivers a payload to achieve remote code execution. It constructs a malicious TAR file with a command-injection filename, sends it via email, and relies on the vulnerable ESG to execute the injected command.

modules/exploits/linux/smtp/barracuda_esg_tarfile_rce.rb:16-26modules/exploits/linux/smtp/barracuda_esg_tarfile_rce.rb:102-121

Requirements

  • Network access to the target SMTP service (port 25)modules/exploits/linux/smtp/barracuda_esg_tarfile_rce.rb:117
  • A valid target email address on the ESG appliancemodules/exploits/linux/smtp/barracuda_esg_tarfile_rce.rb:75

Observed behavior

  • Connects to the target SMTP server and checks the banner for Barracuda ESG identificationmodules/exploits/linux/smtp/barracuda_esg_tarfile_rce.rb:85-89
  • Wraps the attacker's payload in backticks and single quotes to form a malicious filenamemodules/exploits/linux/smtp/barracuda_esg_tarfile_rce.rb:103-108
  • Creates a TAR archive containing a file with the malicious filenamemodules/exploits/linux/smtp/barracuda_esg_tarfile_rce.rb:112
  • Composes and sends an email with the malicious TAR attachment to the targetmodules/exploits/linux/smtp/barracuda_esg_tarfile_rce.rb:114-118
Safety-review evidence

Behaviors behind the backdoor verdict

Observables

Exploit Mechanism
Payload withheldThe exploit wraps the payload in backticks and single quotes to trigger command substitution on the target.modules/exploits/linux/smtp/barracuda_esg_tarfile_rce.rb:108
Payload Delivery
Payload withheldThe module sends the exploit via SMTP to the target email address.modules/exploits/linux/smtp/barracuda_esg_tarfile_rce.rb:117-118
Method Override
Payload withheldThe module temporarily overrides a method to bypass the 100-byte filename limit for the injection payload.modules/exploits/linux/smtp/barracuda_esg_tarfile_rce.rb:129-143
Review boundaries

What the analysis did not establish

  • Analysis is based solely on the module source code and metadata; framework mixins, libraries, and external payloads are not expanded.
  • The module's actual runtime behavior, reliability, and safety are not verified.
  • Only the module source and metadata were reviewed; framework mixins, libraries, and external payloads were not expanded or analyzed.
  • Binary files were not inspected (metadata only).
Model interpretation

This review is limited to the supplied PoC code and context. It does not assert that the code works or is safe to execute.

Repository PoCs

GitHubcfielding-r7/poc-cve-2023-2868Repository PoCby cfielding-r7Stars: 11Not analyzed2 files

2.8 KiB

GitHub

PoC details
GitHubcashapp323232/CVE-2023-2868CVE-2023-2868Repository PoCby cashapp323232Stars: 0Not analyzed1 file

490 B

GitHub

PoC details
GitHubgetdrive/PoCRepository PoCby getdriveStars: 0Not analyzed96 files

757.9 KiB · linked to 16 vulnerabilities

GitHub

PoC details
GitHubkrmxd/CVE-2023-2868Repository PoCby krmxdStars: 0Not analyzed1 file

781 B

GitHub

PoC details

References

4