CVE-2024-12905
JavaScript vulnerability analysis and mitigation

Overview

CVE-2024-12905 is a vulnerability in the tar-fs package that combines an Improper Link Resolution Before File Access (Link Following) and Improper Limitation of a Pathname to a Restricted Directory (Path Traversal). The vulnerability was discovered and disclosed on March 27, 2025, affecting tar-fs versions from 0.0.0 before 1.16.4, from 2.0.0 before 2.1.2, and from 3.0.0 before 3.0.8 (NVD).

Technical details

The 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 specifically associated with index.js in the tar-fs package. The vulnerability has been assigned a CVSS v3.1 base score of 7.5 (High) with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N, indicating network accessibility with low attack complexity and no required privileges or user interaction (Snyk).

Impact

When exploited, this vulnerability allows an attacker to overwrite or write unauthorized files outside the intended directory by exploiting the path traversal and link following vulnerabilities. This can lead to significant integrity impacts on the affected system (Snyk).

Mitigation and workarounds

The recommended mitigation is to upgrade tar-fs to version 1.16.4, 2.1.2, 3.0.7 or higher, depending on your current major version. A fix has been implemented that includes additional validation of symlinks and improved path resolution (GitHub Commit).

Additional resources


SourceThis report was generated using AI

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