Files
Val S. 412fd53fb1 ClamD: harden VirusEvent virus name expansion (#1765)
VirusEvent executes the configured command through /bin/sh -c. It previously expanded %v by appending the detection name directly into that command string, matching the older behavior for virus-name substitution.

Loaded signature names are treated as trusted database content rather than attacker-controlled scanned-file input, so this change is intended as hardening. Still, replacing the shell interpolation avoids a footgun for deployments that load custom signatures and use VirusEvent.

Match the existing %f behavior by replacing %v with a disabled-feature message instead of the virus name. The virus name remains available to VirusEvent scripts through CLAM_VIRUSEVENT_VIRUSNAME.

Update the clamd configuration help, sample config, manpage source, and VirusEvent unit test to cover the environment-variable path.

Credit: Yazdan Soltani

Credit: Nir Yehoshua

CLAM-2992
2026-07-24 18:08:00 -04:00
..

clam.exe is an extremely small (544 bytes!) MZ+PE executable that prints
a nice message :-) You can use it to test attachment scanning in your ClamAV
based mail scanner.

NOTE: upon request the testfiles are not shipped anymore
Instead they are dynamically generated at make time.