CVE-2023-2868: Remote Command Injection in Barracuda Email Security Gateway TAR Attachment Processing
- Vendor
- Barracuda Networks
CVE-2023-2868 is a remote command injection vulnerability affecting Barracuda Email Security Gateway appliance versions 5.1.3.001 through 9.2.0.006, inclusive. Incomplete validation of member filenames within user-supplied TAR archives allows attacker-controlled shell syntax to reach Perl's qx operator during email-attachment scanning. A specially crafted archive can therefore execute arbitrary system commands with the privileges of the ESG product, without authentication or recipient interaction. The vulnerability was exploited as a zero-day from at least October 2022, including by the China-nexus espionage group UNC4841, to deploy persistent backdoors and steal data.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation enables remote compromise of an ESG appliance through its email-processing functionality. Observed intrusions involved reverse shells, persistent backdoors including SEASPY and SALTWATER, email monitoring, credential harvesting, and data exfiltration. Compromised appliances also provided footholds for access to other systems in victim networks. Previously exploited devices remained at risk after patching because attacker-installed persistence could survive the vulnerability fix.
Mitigation
If you can’t patch tonight, do this now.
Immediately isolate suspected compromised appliances pending replacement. Review email and network logs, preserve forensic appliance images, and assess the entire environment using available indicators and malware-detection rules. Monitor for use of credentials previously stored on affected appliances and investigate suspicious outbound connections. Attachment scanning, removal of suspicious archives, and verification of actual attachment types can provide defense in depth, but filename-extension filtering alone is insufficient because exploit archives have been delivered under non-TAR extensions. These controls do not replace patching or replacement of compromised appliances.
Remediation
Patch, then assume compromise.
Verify installation of Barracuda patch BNSF-36456, which was automatically distributed to customer appliances. Barracuda deployed a vulnerability fix on May 20, 2023, followed by a containment script on May 21. For impacted or compromised appliances, immediately isolate and replace the device regardless of its patch level; patching alone is not sufficient to restore trust. Investigate the surrounding network for persistence, lateral movement, email-account compromise, and data exfiltration. Revoke and rotate domain and local credentials present on compromised appliances, and revoke and reissue exposed certificates.
Exploits
1 exploit validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2023-2868 exploited in the wild?
- Yes. As of Nov 11, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on May 26, 2023.
- Is there a public exploit for CVE-2023-2868?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2023-2868, the earliest disclosed Jun 20, 2023.
- Is there a patch for CVE-2023-2868?
- Verify installation of Barracuda patch BNSF-36456, which was automatically distributed to customer appliances. Barracuda deployed a vulnerability fix on May 20, 2023, followed by a containment script on May 21.
- What products are affected by CVE-2023-2868?
- Barracuda Networks Email Security Gateway 300 Firmware, Barracuda Networks Email Security Gateway 400 Firmware, Barracuda Networks Email Security Gateway 600 Firmware, Barracuda Networks Email Security Gateway 800 Firmware, and Barracuda Networks Email Security Gateway 900 Firmware.
- How severe is CVE-2023-2868?
- CVE-2023-2868 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 86.8% (100th percentile) as of Nov 11, 2026.
Recent activity
51 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.