Report security issues privately through GitHub's private vulnerability reporting: open the repository's Security tab and choose Report a vulnerability (https://github.com/bajalabs/venenum/security/advisories/new). Do not open a public issue for a security problem. Include what you found, how to reproduce it, and its impact. We aim to acknowledge a report within five working days and to agree on a disclosure date with you.
Fixes go into the latest release.
venenum sits between applications that receive untrusted files and a ClamAV daemon. It is designed to be reachable only by those applications, on a private network or behind TLS.
- The scan path from abuse. Only callers holding a key can make it download or scan anything. A request carries
X-Venenum-Callerand an HMAC-SHA256 signature over a timestamp and the exact body (docs/signing.md); the comparison is constant-time and the timestamp must be within the signing window (60 s by default). - The network behind it (SSRF).
POST /v1/scandownloads only from origins listed inVENENUM_FETCH_ORIGINS(scheme, host and port must match exactly), refuses URLs with credentials, and never follows redirects, so an allowed origin cannot bounce the request elsewhere. With no origins configured it downloads nothing. - The verdict's subject. The caller states the object's sha256 and size; venenum refuses (
409) bytes that differ, so a verdict always applies to the object the caller meant, even if the stored object was swapped between upload and scan. - Its own resources. Objects are capped at
VENENUM_MAX_BYTESwhether the size is declared, sent or only discovered while streaming; JSON bodies are capped atVENENUM_JSON_BODY_LIMIT; downloads and clamd commands have time limits; clamd replies are bounded. - Stale protection. When the signature database is older than
VENENUM_MAX_SIGNATURE_AGE_HOURS, or clamd does not answer,/healthfails and every scan answers503: an outdated or missing engine never produces acleanverdict.
- Network attackers between the caller and venenum. The service speaks plain HTTP. The signature stops tampering with the body, but not reading it. Use TLS (a reverse proxy or a service mesh) or a private network.
- Replay inside the window. There is no nonce cache: a captured request can be sent again within the signing window. It can only repeat the same scan of the same bytes.
- Unsigned headers.
X-Scan-Sha256andX-Scan-Sizeare checked against the signed body;X-Scan-Refand therefin a JSON body are labels for logs and are only as trustworthy as the caller. - A compromised caller key. Anyone with a key can use the service within the limits above. Keep keys in a secret store, give each application its own caller name, and rotate as described in docs/signing.md.
- An allowed origin that serves hostile content, or a DNS answer that changes. venenum trusts the origins you list; list object-store endpoints you control, not shared or user-controlled hosts.
- Detection limits.
cleanmeans ClamAV matched no signature. It is one layer, not a guarantee: keep uploads quarantined until scanned, and treat files as untrusted afterwards too. - Information on the health endpoints.
/healthand/v1/versionare unauthenticated and show the engine and signature versions.
- Run the image as provided: a non-root user, no shell entrypoint, only port 3330. In
compose.yaml, clamd is not published and venenum is bound to127.0.0.1unless you changeVENENUM_BIND. - Generate keys with
openssl rand -hex 32; never commit.env. - Keep the clamav container updating its signatures (the official image runs freshclam) and alert on
/health. - The service logs the caller, the reference, the verdict and the size of each scan, never the body or the signature.