Skip to main content
VulnerabilityPublished Updated

CVE-2024-12905: tar-fs · Link Following

Affects tar-fsSource CVE Database V5

0

Public exploit available (Exploit-DB) · CVSS 7.5 High · fixed in 3.0.8 : patch tar-fs as a priority.

Data as of 26 Oct 2026, 10:12 UTC

CVSS 3.1 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
2.2% chance of exploitation in 30 days – higher than 83% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 3.0.8, 2.1.2, 1.16.4
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Exploitation evidence

t = 0 is the CVE’s publication on cve.org

  1. Disclosed: evidence found.

    CVE published 27 Mar 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  4. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

Timeline

  1. CVE ID reserved

    by Seal Security

    , 94 days before disclosure

  2. CVE published

    on cve.org

    , t = 0

  3. First Exploit-DB entry (opens in a new tab)

    tar-fs 3.0.0 - Arbitrary File Write/Overwrite

    , 26 days after disclosure

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade tar-fs to 3.0.8, 2.1.2 or 1.16.4.

Affected software

ProductAffectedFixed in
npmtar-fspkg:npm/tar-fsOther threatsAffected
  • <1.16.4
  • >=2.0.0 <2.1.2
  • >=3.0.0 <3.0.8
Fixed in
  • 1.16.4
  • 2.1.2
  • 3.0.8

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

  1. Immediately upgrade tar-fs to the latest patched versions: 1.16.4 or later for the 0.x branch, 2.1.2 or later for the 2.x branch, and 3.0.8 or later for the 3.x branch.
  2. Implement strict validation and sanitization of tar archive contents before extraction, including checking for symbolic links and path traversal sequences.
  3. Use sandboxed or isolated environments for extracting tar files, limiting filesystem permissions to prevent unauthorized writes outside designated directories.
  4. Employ application-level whitelisting of allowable file paths and names during extraction.
  5. Monitor logs for unusual file modifications or extraction activities.
  6. Review and audit CI/CD pipelines and automated processes that handle tar archives to ensure they do not process untrusted inputs.
  7. Educate developers and DevOps teams about the risks of unsafe archive extraction and encourage secure coding practices around file handling.

Description

An Improper Link Resolution Before File Access ("Link Following") and Improper Limitation of a Pathname to a Restricted Directory ("Path Traversal"). This vulnerability occurs when extracting a maliciously crafted tar file, which can result in unauthorized file writes or overwrites outside the intended extraction directory. The issue is associated with index.js in the tar-fs package. This issue affects tar-fs: from 0.0.0 before 1.16.4, from 2.0.0 before 2.1.2, from 3.0.0 before 3.0.8.

References

Community reviews

Loading reviews…