Remote command injection in Barracuda Email Security Gateway
CVE-2023-2868 is a remote command injection vulnerability affecting the appliance form factor of Barracuda Email Security Gateway (ESG), versions 5.1.3.001 through 9.2.0.006. Incomplete validation of archive-member names during TAR email-attachment scanning allows specially crafted names to execute system commands through Perl's qx operator with ESG product privileges. Exploitation requires neither authentication nor recipient interaction. The vulnerability was exploited as a zero day as early as October 2022, including in an espionage campaign attributed to UNC4841.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation permits unauthorized system-command execution with administrator privileges on the ESG appliance. Observed intrusions involved reverse shells, persistent backdoors, email monitoring, credential harvesting, and exfiltration of email data and certificates. Compromised appliances were also used as entry points into other systems within victim networks. Established persistence could survive application of the vulnerability patch, leaving previously exploited appliances at risk of continued compromise.
If you can’t patch tonight, do this now.
Immediately isolate compromised appliances and discontinue their use pending replacement. Review email and network logs, preserve forensic appliance images, and conduct network-wide compromise assessment rather than relying exclusively on appliance-level indicator scanning. Monitor for use of credentials exposed on affected appliances. Scan and remove suspicious email attachments and verify actual attachment types rather than relying on filename extensions; these measures do not substitute for patching and replacement of compromised appliances.
Patch, then assume compromise.
Apply and verify Barracuda security patch BNSF-36456, which was automatically deployed to customer appliances to address the command injection flaw. Patching alone does not establish that an exploited appliance is trustworthy: isolate and replace impacted appliances as soon as possible, regardless of patch level, coordinating replacement with Barracuda support. Investigate the surrounding environment for persistence, lateral movement, data exfiltration, and compromised email accounts. Revoke and rotate all local and domain credentials present on compromised appliances, and revoke and reissue certificates present at the time of compromise.
1 exploit validated by Mallory's analysis. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
41 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.