Vulnerability record · CVE-2023-2868 · published 24 May 2023
CVE-2023-2868: Barracuda Email Security Gateway tar filename command injection
Barracuda · Email Security Gateway 300 Firmware
The Barracuda Email Security Gateway appliance fails to properly validate filenames inside user-supplied .tar archives, allowing a remote attacker to inject and execute system commands via Perl's qx operator. The flaw affects versions 5.1.3.001 through 9.2.0.006 and was fixed in patch BNSF-36456, which was automatically applied to customer appliances. Because it is remotely reachable without authentication, it is a serious pre-auth compromise path for a perimeter email security device.
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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Automated analysis
critical priorityCVSS 9.8 pre-auth remote command injection on a perimeter appliance, listed in CISA KEV with a 0.877 EPSS probability, makes this an urgent patching priority.
What it is
The Barracuda Email Security Gateway appliance fails to properly validate filenames inside user-supplied .tar archives, allowing a remote attacker to inject and execute system commands via Perl's qx operator. The flaw affects versions 5.1.3.001 through 9.2.0.006 and was fixed in patch BNSF-36456, which was automatically applied to customer appliances. Because it is remotely reachable without authentication, it is a serious pre-auth compromise path for a perimeter email security device.
Impact
An attacker can execute arbitrary system commands with the privileges of the Email Security Gateway product, giving full control of the appliance and a foothold on the network edge. This can lead to data theft, persistent access, and use of the appliance as a pivot point.
Attack surface
The vulnerability is network-reachable (AV:N) with no privileges or user interaction required (PR:N, UI:N), reached by sending a crafted .tar archive to the affected appliance. No authentication is needed per the CVSS vector.
Exploitation
CVE-2023-2868 is listed in CISA's Known Exploited Vulnerabilities catalog (added 2023-05-26) and has a very high EPSS 30-day probability of 0.87691 (99.75th percentile), indicating active exploitation is expected or observed. No ransomware campaign use is documented in the record.
What to do
- Apply the vendor patch BNSF-36456 immediately; Barracuda states it was automatically applied to all customer appliances, so verify the appliance is running a fixed version.
- If the appliance cannot be confirmed patched, isolate or replace it per Barracuda's ESG vulnerability guidance.
- Restrict management and mail-processing exposure of the ESG appliance to only required networks.
- Monitor Barracuda status and vendor advisories for follow-up guidance and any required credential rotation.
- Review the appliance for signs of prior compromise before returning it to production.
Detection
- Inspect ESG appliance logs for unexpected command execution or Perl qx activity tied to tar archive processing.
- Alert on anomalous outbound connections or new processes originating from the Email Security Gateway appliance.
- Monitor for unusual .tar archive handling or filename patterns containing shell metacharacters reaching the appliance.
- Correlate appliance activity with CISA KEV guidance and hunt for indicators of post-exploitation persistence on the device.
This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.
Exploitation in the wild
CISA added CVE-2023-2868 to the Known Exploited Vulnerabilities catalog on 26 May 2023 as "Barracuda Networks ESG Appliance Improper Input Validation Vulnerability". Required action: Apply updates per vendor instructions. Federal deadline 16 June 2023.
Affected products
5 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://status.barracuda.com/incidents/34kx82j5n4q9 | Vendor Advisory |
| https://www.barracuda.com/company/legal/esg-vulnerability | MitigationVendor Advisory |
| https://status.barracuda.com/incidents/34kx82j5n4q9 | Vendor Advisory |
| https://www.barracuda.com/company/legal/esg-vulnerability | MitigationVendor Advisory |
| https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2023-2868 | US Government Resource |
Track CVE-2023-2868 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2023-2868), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.