VYPR
Unrated severityNVD Advisory· Published Mar 30, 2004· Updated Apr 16, 2026

CVE-2004-1876

CVE-2004-1876

Description

The "%f" feature in the VirusEvent directive in Clam AntiVirus daemon (clamd) before 0.70 allows local users to execute arbitrary commands via shell metacharacters in a file name.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

ClamAV clamd before 0.70 allows local users to execute arbitrary commands via shell metacharacters in filenames when the %f feature is used in VirusEvent.

Vulnerability

In Clam AntiVirus daemon (clamd) versions prior to 0.70, the VirusEvent configuration directive supports a %f placeholder that is replaced with the name of the infected file [1][2][3]. The file name is not sanitized before being inserted into the command string, allowing shell metacharacters (e.g., backticks, semicolons) to be interpreted by the shell when the command is executed. This issue affects all configurations where VirusEvent contains %f [2][3].

Exploitation

An attacker who can cause clamd to scan a file with a crafted file name (for example, by sending an email with a virus attachment named ;command or similar) can exploit this vulnerability [2][3]. When clamd detects a virus in that file, it triggers the VirusEvent and substitutes the malicious filename, leading to execution of the attacker-supplied commands [2]. The attacker does not require authentication to the scanning system beyond the ability to introduce a file that clamd will scan [2][3].

Impact

Successful exploitation allows arbitrary command execution with the privileges of the clamd process, which often runs as root [2][3]. An attacker can fully compromise the affected system, install malware, exfiltrate data, or pivot to other hosts [3].

Mitigation

Upgrade to ClamAV version 0.70 or later, which disables the %f feature [2][3]. Users who cannot immediately upgrade should remove any use of %f from the VirusEvent directive in clamav.conf [2][3]. The Gentoo GLSA 200405-03 provides specific upgrade instructions for Gentoo systems [3].

AI Insight generated on May 24, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

10
  • ClamAV/Clamav9 versions
    cpe:2.3:a:clam_anti-virus:clamav:0.51:*:*:*:*:*:*:*+ 8 more
    • cpe:2.3:a:clam_anti-virus:clamav:0.51:*:*:*:*:*:*:*
    • cpe:2.3:a:clam_anti-virus:clamav:0.52:*:*:*:*:*:*:*
    • cpe:2.3:a:clam_anti-virus:clamav:0.53:*:*:*:*:*:*:*
    • cpe:2.3:a:clam_anti-virus:clamav:0.54:*:*:*:*:*:*:*
    • cpe:2.3:a:clam_anti-virus:clamav:0.60:*:*:*:*:*:*:*
    • cpe:2.3:a:clam_anti-virus:clamav:0.65:*:*:*:*:*:*:*
    • cpe:2.3:a:clam_anti-virus:clamav:0.67:*:*:*:*:*:*:*
    • cpe:2.3:a:clam_anti-virus:clamav:0.68:*:*:*:*:*:*:*
    • cpe:2.3:a:clam_anti-virus:clamav:0.68.1:*:*:*:*:*:*:*
  • Range: <0.70

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.