ClamavApplication

CVE-2024-20506

MEDIUM · 6.1 CVSS v3.1 Published 2024-09-04
Fix available
A fix is available. Upgrade to 0.103.12 / 1.0.7 or later.
See remediation →
63/100
Remediation priority · Elevated
Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
A vulnerability in the ClamD service module of Clam AntiVirus (ClamAV) versions 1.4.0, 1.3.2 and prior versions, all 1.2.x versions, 1.0.6 and prior versions, all 0.105.x versions, all 0.104.x versions, and 0.103.11 and all prior versions could allow an authenticated, local attacker to corrupt critical system files. The vulnerability is due to allowing the ClamD process to write to its log file while privileged without checking if the logfile has been replaced with a symbolic link. An attacker could exploit this vulnerability if they replace the ClamD log file with a symlink to a critical system file and then find a way to restart the ClamD process. An exploit could allow the attacker to corrupt a critical system file by appending ClamD log messages after restart.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

ClamD service in ClamAV versions prior to fixed releases does not check if its configured log file has been replaced with a symbolic link before writing log entries with elevated privileges. An authenticated local attacker can replace the log file with a symlink to a critical system file and, upon process restart, cause log messages to be appended to the target file, corrupting it.

MitigationUpgrade to a patched version of ClamAV (1.4.1, 1.3.3, 1.1.0, or 0.105.1 depending on branch). As a compensating control, restrict write access to the ClamD log directory to prevent unauthorized symlink replacement.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
ClamavApplication
Affected:< 0.103.12>= 0.104.0, < 1.0.7>= 1.2.0, < 1.3.2= 1.4.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
High

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed ClamAV version
    Run 'clamd --version' or check your package manager (e.g., 'rpm -q clamav', 'dpkg -l clamav')
    Affected if The version falls into any of these ranges: < 0.103.12, >= 0.104.0 and < 1.0.7, >= 1.2.0 and < 1.3.2, or exactly 1.4.0
  2. Confirm ClamD daemon is enabled
    Check if the clamd service is running (e.g., 'systemctl status clamd' or 'ps aux | grep clamd')
    Affected if ClamD service is active and the version is affected - the vulnerability exists only in the ClamD daemon component
  3. Locate ClamD log file configuration
    Inspect your clamd.conf configuration file for the 'LogFile' directive to determine the configured log file path
    Affected if A log file path is configured and the installed version is vulnerable
  4. Check if log file is a symbolic link
    Use 'ls -la' on the log file path from the configuration to see if it is a symlink (indicated by '->' in the output)
    Affected if The configured log file or its parent directory is currently a symbolic link pointing to another file location
  5. Verify log directory permissions
    Check write permissions on the directory containing the ClamD log file with 'ls -ld <log_directory>'
    Affected if The directory is writable by users other than the clamd user, allowing unauthorized symlink replacement

You are affected if you run an affected ClamAV version with ClamD enabled and your log file or its directory can be replaced with a symlink by an authenticated local user.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 0.103.12 / 1.0.7 / 1.3.2 or later
Fixed in 0.103.121.0.71.3.2
Interim mitigation

Upgrade to a patched version of ClamAV (1.4.1, 1.3.3, 1.1.0, or 0.105.1 depending on branch). As a compensating control, restrict write access to the ClamD log directory to prevent unauthorized symlink replacement.

Recommended fix High confidence

Upgrade to the latest version in your current branch: 0.103.12+, 1.0.7+, 1.3.2+, or 1.4.1+

  1. 1. Identify your current ClamAV version using 'clamd --version' or 'clamav-milter --version'
  2. 2. Based on your current version line, upgrade to the minimum fixed version: For 0.103.x line, upgrade to 0.103.12 or later; For 0.104.x/0.105.x/1.0.x line, upgrade to 1.0.7 or later; For 1.2.x/1.3.x line, upgrade to 1.3.2 or later; For 1.4.x line, upgrade to the latest stable 1.4.x release
  3. 3. Verify the upgrade by checking 'clamd --version' shows a version >= the fixed version for your branch
  4. 4. Ensure the ClamD service is running with appropriate permissions - avoid running as root if possible, or use read-only log file paths
  5. 5. Set restrictive permissions on the log directory (e.g., chmod 755 or tighter) to prevent unauthorized users from replacing log files with symlinks
Caveat Review release notes for your branch - major version jumps (e.g., 0.103 to 1.0) may include configuration or behavioral changes

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Clamav Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing3.0 h
  • Review / QA2.0 h
11.0 hours of engineering $1,930
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,088.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2024-20506 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2024-20506 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data