module
Barracuda ESG TAR Filename Command Injection
| Disclosed | Created |
|---|---|
| May 23, 2023 | Mar 24, 2026 |
Disclosed
May 23, 2023
Created
Mar 24, 2026
Description
This module exploits CVE-2023-2868, a command injection vulnerability in
Barracuda Email Security Gateway (ESG) appliances. The vulnerability exists
in how the ESG processes TAR file attachments - filenames containing shell
metacharacters (backticks) are passed directly to shell commands during
extraction, allowing remote command execution.
The exploit sends an email with a specially crafted TAR attachment where
the filename contains a backtick-wrapped command. When the ESG processes
this attachment, the command is executed as the mail processing user.
Note: Payload execution may take 30-90 seconds after email delivery.
Amavisd queues and processes attachments asynchronously.
Affected versions: Barracuda ESG firmware prior to May 2023 patch.
Payloads containing single quotes or backticks are incompatible with
the injection mechanism. Use cmd/unix/generic with a custom CMD for
specialized payload requirements.
Barracuda Email Security Gateway (ESG) appliances. The vulnerability exists
in how the ESG processes TAR file attachments - filenames containing shell
metacharacters (backticks) are passed directly to shell commands during
extraction, allowing remote command execution.
The exploit sends an email with a specially crafted TAR attachment where
the filename contains a backtick-wrapped command. When the ESG processes
this attachment, the command is executed as the mail processing user.
Note: Payload execution may take 30-90 seconds after email delivery.
Amavisd queues and processes attachments asynchronously.
Affected versions: Barracuda ESG firmware prior to May 2023 patch.
Payloads containing single quotes or backticks are incompatible with
the injection mechanism. Use cmd/unix/generic with a custom CMD for
specialized payload requirements.
Authors
Mandiant
cfielding-r7
Curt Hyvarinen
cfielding-r7
Curt Hyvarinen
Platform
Unix
Architectures
cmd
References
Module Options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
NEW
Explore Exposure Command
Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.