CVE-2026-70622
Clam AntiVirus vulnerability analysis and mitigation

Overview

CVE-2026-70622 is a symlink escape vulnerability in the Builder::append_dir_all() function of the tar-rs Rust crate (maintained under the composefs/tar-rs repository). It affects versions 0.4.11 through 0.4.46 inclusive, allowing low-privileged attackers to cause a privileged archiving process to read and disclose files outside the intended source root directory. The vulnerability was published on August 10, 2026, and assigned by VulnCheck. It carries a CVSS v3.1 base score of 6.5 (Medium) and a CVSS v4.0 base score of 7.1 (High) (Github Advisory, VulnCheck PoC).

Technical details

The root cause is CWE-59 (Improper Link Resolution Before File Access / 'Link Following'). By default, Builder::new() sets follow = true, meaning append_dir_all() dereferences symlinks when traversing the source directory. While archive entry names are correctly confined to the source root via path.join(src.strip_prefix(src_path).unwrap()), the actual filesystem reads — through src.is_dir(), fs::read_dir(), fs::metadata(), and fs::File::open() — follow symlinks without verifying that resolved targets remain within src_path. This mismatch means an attacker who can plant symlinks in a directory that a privileged process will archive can cause out-of-bounds files to be embedded in the resulting archive as regular files. A public proof-of-concept demonstrating the full attack scenario is available (VulnCheck PoC).

Impact

Successful exploitation results in high confidentiality impact with no integrity or availability impact. A low-privileged attacker can cause a privileged process (e.g., a backup job, CI artifact packager, or workspace export service) to include arbitrary files — including those readable only by root — in a generated archive that the attacker can then access. This constitutes a confused-deputy / privileged file disclosure scenario, potentially exposing credentials, private keys, configuration files, or other sensitive data that the attacker could not read directly. Lateral movement is possible if disclosed files contain credentials or secrets enabling further access (VulnCheck PoC, Github Advisory).

Exploitability

A public proof-of-concept (PoC) is available as a GitHub Gist demonstrating both file and directory symlink escape scenarios. CISA's SSVC assessment classifies exploitation as 'poc' with technical impact rated 'partial' and automatable as 'no'. The vulnerability is not listed in the CISA KEV catalog, and no in-the-wild exploitation or threat actor attribution has been reported. The EPSS score is approximately 0.34% (27th percentile), indicating a low but non-negligible probability of exploitation in the near term (VulnCheck PoC, Github Advisory).

Exploitation steps

  1. Identify a vulnerable target: Locate a service or process that uses tar-rs versions 0.4.11–0.4.46 with Builder::append_dir_all() to archive a directory the attacker can write to (e.g., a workspace export feature, backup job, or CI artifact packager running with elevated privileges).
  2. Gain write access to the source directory: Obtain low-privileged access to the system or service that allows writing files or creating symlinks in the directory that will be archived by the privileged process.
  3. Plant a symlink pointing outside the source root: Create a symlink within the attacker-controlled directory targeting a sensitive file or directory outside the archive root, e.g.:
    ln -s /etc/shadow /attacker_dir/leak.txt
    # Or for a directory:
    ln -s /root/.ssh /attacker_dir/escape_dir
  4. Trigger the privileged archiving process: Cause the privileged process to invoke Builder::append_dir_all("", attacker_dir) — for example, by initiating an export, backup, or packaging operation through the application's normal interface.
  5. Retrieve the generated archive: Download or access the resulting .tar archive through the application's export/download endpoint.
  6. Extract the out-of-bounds file contents: Extract the sensitive file from the archive:
    tar -xOf /tmp/export.tar leak.txt
    tar -xOf /tmp/export.tar escape_dir/authorized_keys
    The file is embedded as a regular file in the archive, bypassing the original filesystem permissions (VulnCheck PoC).

Indicators of compromise

  • File System: Presence of unexpected symlinks in directories that are archived by privileged processes, pointing to paths outside the archive root (e.g., /etc/, /root/, /var/); generated .tar archives containing entries whose resolved content originates from outside the intended source directory.
  • Logs: Application or service logs showing archive generation requests from low-privileged users followed by download/export of the resulting archive; audit logs (e.g., auditd) recording open() or read() syscalls by a privileged process on files outside the expected source directory tree.
  • Process: Privileged archiving processes (e.g., backup daemons, export workers) accessing file paths outside their expected working directories, observable via tools like strace, lsof, or auditd with file access rules configured on sensitive paths.

Mitigation and workarounds

Immediate workaround: Callers archiving untrusted or user-controlled directories should explicitly disable symlink following before calling append_dir_all():

let mut builder = tar::Builder::new(writer);
builder.follow_symlinks(false);
builder.append_dir_all("", untrusted_root)?;
builder.finish()?;

With follow_symlinks(false), symlinks are stored as symlink entries rather than being dereferenced and embedded as regular files. Additionally, restrict the ability of untrusted users to create symlinks in directories that will be archived by privileged processes, and implement access controls (e.g., nosymfollow mount option where applicable). A patched release of tar-rs had not been published as of the disclosure date; monitor the composefs/tar-rs repository for an official fix (VulnCheck PoC, Github Advisory).

Additional resources


SourceThis report was generated using AI

Related Clam AntiVirus vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-20348HIGH7.5
  • Clam AntiVirus logoClam AntiVirus
  • clamav1.4
NoYesAug 07, 2026
CVE-2026-20347HIGH7.5
  • Clam AntiVirus logoClam AntiVirus
  • clamav
NoYesAug 07, 2026
CVE-2026-20346HIGH7.5
  • Clam AntiVirus logoClam AntiVirus
  • clamav
NoYesAug 07, 2026
CVE-2026-20345HIGH7.5
  • Clam AntiVirus logoClam AntiVirus
  • clamav
NoYesAug 07, 2026
CVE-2026-70622HIGH7.1
  • Clam AntiVirus logoClam AntiVirus
  • rust-cargo-c
NoNoAug 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management