Remote Code injection in Barracuda Email Security Gateway (CVE-2023-2868)
Published In CISA KEV since Sources: SingCERT, CVE.org, pwn.watch
What is affected, what to do
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 is being actively exploited; treat it as a priority. Update Barracuda Email Security Gateway to version 9.2.0.006. Immediate actions, mitigation and detection rules are in the runbook below.
- Affected
- Barracuda Email Security Gateway
lt 5.1.3.001..9.2.0.006
- Barracuda Email Security Gateway
- Fixed in
- Barracuda Email Security Gateway
9.2.0.006
- Barracuda Email Security Gateway
Not sure whether and how you are affected? Ask a question about this vulnerability
Metrics
9.8
Priority
XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.
Source: NVD, CVSS v3
9.4
CVSS v3
Severity Critical on the scale from 0 to 10.
Source: SingCERT, CVE.org, pwn.watch
86.8 %
EPSS score
High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
Source: FIRST EPSS, percentile 99.74
Show all metrics
- Severity
- Critical
Priority (0–325)
The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?
Read in glossary- 229.30 Methodology
Exploit maturity
An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.
Read in glossary- actively exploited
XIEM Effective CVSS
XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.
Read in glossary- 9.8 Methodology
CVSS v3
CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.
Read in glossary- 9.4
EPSS score
The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.
Read in glossary- 86.8 %
- High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
EPSS percentile
The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.
Read in glossary- 99.74
- Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
KEV status
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- Actively exploited
- Published
In CISA KEV since
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- CISA assessment (SSVC)
- Exploitation: active · automatable · Technical impact: total
- Source: CISA Vulnrichment, as of 16 January 2025
CWE
CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.
Read in glossary- CWE-20
Response and mitigation
Why act now?
Prioritisation rationale
This CVE is on KEV because it was abused as a zero-day against Barracuda ESG appliances from at least October 2022 — more than seven months before disclosure — reportedly by a state-aligned actor tracked by Mandiant as UNC4841. The flaw is network-reachable without authentication through a single crafted email and yields code execution on a perimeter device with full visibility into mail flow, which is the worst-case profile the CVSS vector reflects. Target profiles skew toward government, critical infrastructure, universities and large enterprises; even though CISA does not flag ransomware use, the data-exfiltration impact (mail content, credentials, certificates) routinely crosses NIS2 reporting thresholds. Prioritisation: highest urgency for any organisation that ever ran an affected ESG unit — patching is not sufficient, physical replacement and credential rotation are mandatory.
Runbook step 1
Immediate response (0-24 h)
- Treat the ESG appliance as compromised: Barracuda has publicly confirmed that patching alone is insufficient — affected hardware must be replaced regardless of patch level. Fail mail flow over to a temporary relay (M365 EOP, Proxmox Mailgateway, commercial cloud SEG) immediately.
- Disconnect all ESG devices in the 5.1.3.001 to 9.2.0.006 range from the internet: block inbound 25/tcp at the perimeter firewall and switch MX records to the replacement relay (lower TTL in advance).
- Verify that vendor patch BNSF-36456 was applied (Barracuda pushed it automatically) through the Barracuda portal. The patch stops initial exploitation but does not remediate established persistence.
- Rotate every credential ever used on the ESG: LDAP/AD bind account, SMTP smarthost logins, API keys, SNMP community strings, TLS certificates including private keys, and any stored mail-store credentials.
- Preserve forensic evidence (config backup, logs, disk image via Barracuda support) before replacement or reset, then hunt for the published SALTWATER, SEASPY and SEASIDE indicators from Barracuda and Mandiant IoC lists.
- Review NIS2 / national CSIRT reporting duty: a mail-gateway compromise with likely data exfiltration almost always triggers the 24-hour early-warning obligation.
Runbook step 2
Mitigation layers
- Network segmentation: tightly allowlist outbound ESG traffic to defined mail smarthosts and Barracuda update endpoints only. Block any outbound HTTPS and SSH to non-Barracuda destinations — the known backdoors beacon over 443/tcp and 22/tcp.
- Perimeter WAF/IPS: enable the Suricata/Snort Barracuda-ETPro signatures for SALTWATER/SEASPY/SEASIDE; at the upstream relay, drop inbound SMTP attachments with nested .tar archives whose internal filenames exceed roughly 200 bytes or contain shell metacharacters (
|,;, backticks,$()). - IAM hardening: restrict ESG admin access to a dedicated jump-host VLAN, enforce MFA via the fronting SSO; downgrade the LDAP bind account to read-only and scope it to an OU without privileged groups.
- Egress monitoring: baseline ESG netflow/Zeek telemetry and alert on long-lived low-variance sessions (beaconing) or any traffic into hosters without prior history.
- Mail-flow redundancy: establish a permanent secondary SEG posture (cloud SEG plus on-prem filter) so comparable appliance compromises can be bypassed via MX cutover within minutes.
- Vulnerability management: classify ESG appliances as end-of-trust and prioritise a replacement project; Barracuda offers no-cost replacement of compromised units.
Runbook step 3
Detection rules
- Zeek/Suricata: alert on outbound TCP from ESG management IPs to non-Barracuda ASNs, especially persistent sessions on 443/tcp or 22/tcp with low volume variance (beaconing). Sigma shape:
network_connection where src_ip in ESG_RANGE and dst_asn not in (ALLOWED_ASNS). - Mail-gateway logs: retrospectively correlate inbound mail with .tar attachments pre-dating May 2023; attachments whose filenames contain shell metacharacters (
$(), backticks,|,;) are the primary exploit vector. - Filesystem IoCs on the appliance (via Barracuda-supplied shell access): look for files such as
/home/product/code/firmware/current/bin/SMTPATTACHMENTS_*, modifiedmod_require_auth.lua, unexpected/etc/crontabor/etc/rc.localentries — Mandiant M-Trends 2023 publishes the full IoC list with backdoor SHA256 hashes. - EDR/SIEM correlation: hunt for LDAP sign-ins by the ESG bind account from source IPs other than the ESG itself (credential replay after exfiltration). KQL shape:
SigninLogs | where UserPrincipalName == "esg-bind@..." and IPAddress != "<ESG_IP>". - DNS telemetry: prioritise alerts on ESG queries to newly registered or DGA-like hostnames; feed the known C2 domains (barracuda.co, bb-cloud.co and others) into threat-intel lookups and extend retrospective search back twelve months.
- Zeek/Suricata: alert on outbound TCP from ESG management IPs to non-Barracuda ASNs, especially persistent sessions on 443/tcp or 22/tcp with low volume variance (beaconing). Sigma shape:
Detection rules
No NEOSEC detection rule is available for this vulnerability yet.
Classification under NIS2 and CRA
Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.
NIS2
NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.
Read in glossary- Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
CRA
The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.
Read in glossary- Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
ISO/IEC 27001
ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.
Read in glossary- Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.
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.
Source: CSA/SingCERT, cvelistv5, pwn.watch, NVD (NIST), CISA KEV Catalog, CVE.org (MITRE)
Affected products
The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.
| Affected versions | Fixed in | ||
|---|---|---|---|
| Barracuda | Barracuda Email Security Gateway |
|
|
Vendors and products
Affected operating systems
| Other | barracuda | email_security_gateway_300_firmware | — |
| Other | barracuda | email_security_gateway_400_firmware | — |
| Other | barracuda | email_security_gateway_600_firmware | — |
| Other | barracuda | email_security_gateway_800_firmware | — |
| Other | barracuda | email_security_gateway_900_firmware | — |
Weakness classes (CWE)
CWE-20Improper Input Validation
Class
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
Entry at MITRE CWE-20
Public exploit references
Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.
| CISA KEV Catalog | CISA Known Exploited Vulnerability (opens in a new tab)cisa.gov | actively exploited |
References & sources
- barracuda.comBarracuda Email Security Gateway Appliance (ESG) VulnerabilityMitigation, Vendor advisory, pwn-watch
- status.barracuda.comincidents/34kx82j5n4q9Vendor advisory
- cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2023-2868government-resource, US government resource
- pwn.watchpwn.watch: Barracuda Email Security Gateway zero-day (CVE-2023-2868)pwn-watch
- cloud.google.comBarracuda ESG Zero-Day Vulnerability (CVE-2023-2868) Exploited Globally by Aggressive and Skilled Actor, Suspected Links to Chinapwn-watch
- NVD (NIST)NVD: CVE-2023-2868pwn-watch
- cisa.govCISA Known Exploited Vulnerabilities Catalogpwn-watch
Embed badge
Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.
<a href="https://intel.neosec.eu/en/cve/CVE-2023-2868"><img src="https://intel.neosec.eu/badge/cve/CVE-2023-2868.svg?lang=en" alt="CVE-2023-2868 – NEOSEC Intel" height="20"></a>