CVE-2007-4560
NoneCVSS
—
EPSS
83.5%
Published
Aug 28, 2007
CISA due date
—
Cloudanix analysis
An old flaw in an email-scanning component could let attackers run their own programs on the server simply by sending a specially crafted message.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Remote command injection via unsanitized recipient field passed to popen in black-hole mode, enabling arbitrary shell command execution with the privileges of the milter process.
Why it matters to the business
Attackers can gain full control of email-filtering systems, leading to data theft, ransomware deployment, service disruption, and regulatory exposure; high EPSS and weaponized exploit maturity increase urgency despite the flaw's age.
How an attack unfolds
An attacker sends an email whose recipient header contains shell metacharacters; when clamav-milter processes the message in black-hole mode the metacharacters reach a popen call to sendmail, resulting in command execution. Named threat actors and public weaponized exploits have been observed leveraging this vector.
How to fix it
Upgrade affected installations to node (Bitnami) 20.12.0 or 21.6.2 (or later) to eliminate the vulnerable clamav-milter code; disable black-hole mode where possible and apply network segmentation around mail gateways until patches are deployed.
How to confirm the fix worked
Confirm the running clamav-milter version is at least 0.91.2 or the listed fixed node (Bitnami) releases; test by sending a benign recipient containing a safe metacharacter and verifying it is rejected or logged rather than executed.
Typical attack path
- Craft email with malicious recipient containing shell metacharacters
- Deliver message to a ClamAV-protected MTA running milter in black-hole mode
- Milter invokes popen with unsanitized recipient field
- Arbitrary command executes on the mail-filtering host
- Attacker establishes persistence or exfiltrates data
How to detect it
Review historical mail logs and milter process creation events for recipient fields containing shell metacharacters or unexpected popen invocations; correlate with sendmail child-process anomalies and any outbound connections from the mail-filtering host.
- recipient field containing ; | & $ `
- popen call with recipient argument in milter logs
- unexpected /bin/sh or cmd.exe child of clamav-milter
What your security team should do
- Immediately schedule upgrade to the specified fixed versions given weaponized exploit maturity and high EPSS
- Audit mail-gateway configurations for black-hole mode usage and restrict recipient field handling
- Monitor for post-exploitation artifacts in mail logs and process creation events
- Apply least-privilege execution contexts to milter processes
The record
clamav-milter in ClamAV before 0.91.2, when run in black hole mode, allows remote attackers to execute arbitrary commands via shell metacharacters that are used in a certain popen call, involving the "recipient field of sendmail."
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | clamav | 0 | 0.91.2-1~volatile1 |
| Debian:11 | clamav | 0 | 0.91.2-1~volatile1 |
| Debian:12 | clamav | 0 | 0.91.2-1~volatile1 |
| Debian:13 | clamav | 0 | 0.91.2-1~volatile1 |
| Debian:4.0 | clamav | 0 | 0.90.1-3etch7 |
Related vulnerabilities
- CVE-2023-20197 A vulnerability in the filesystem image parser for Hierarchical File System Plus (HFS+)… Also affects clamav
- CVE-2023-20052 On Feb 15, 2023, the following vulnerability in the ClamAV scanning library was… Also affects clamav
- CVE-2023-20032 On Feb 15, 2023, the following vulnerability in the ClamAV scanning library was… Also affects clamav
- CVE-2017-11423 The cabd_read_string function in mspack/cabd.c in libmspack 0.5alpha, as used in ClamAV… Also affects clamav
- CVE-2015-2305 Integer overflow in the regcomp implementation in the Henry Spencer BSD regex library… Also affects clamav
- CVE-2012-1457 The TAR file parser in Avira AntiVir 7.11.1.163, Antiy Labs AVL SDK 2.0.3.7, avast! Also affects clamav
- CVE-2012-1459 The TAR file parser in AhnLab V3 Internet Security 2011.01.18.00, Avira AntiVir… Also affects clamav
- CVE-2012-1458 The Microsoft CHM file parser in ClamAV 0.96.4 and Sophos Anti-Virus 4.61.0 allows remote… Also affects clamav