CVE-2024-12905: CWE-59 Improper Link Resolution Before File Access ('Link Following')
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.
AI Analysis
Technical Summary
CVE-2024-12905 is a vulnerability classified under CWE-59 (Improper Link Resolution Before File Access) and CWE-22 (Path Traversal) found in the tar-fs package, a Node.js module used for extracting tar archives. The flaw arises when the package processes maliciously crafted tar files containing symbolic links or path traversal sequences. During extraction, the package fails to properly resolve these links or restrict pathnames, allowing files to be written or overwritten outside the intended extraction directory. This can lead to unauthorized modification of arbitrary files on the host system, potentially overwriting critical system or application files. The vulnerability affects 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. The CVSS 3.1 base score is 7.5, reflecting a high severity due to network attack vector, low attack complexity, no privileges required, and no user interaction needed. The impact is primarily on integrity, as attackers can alter files without authorization. No confidentiality or availability impact is indicated. No known exploits have been reported in the wild as of the publication date. The vulnerability is relevant for any application or service that uses tar-fs to extract tar archives, especially in automated or server-side environments where untrusted tar files might be processed.
Potential Impact
For European organizations, this vulnerability poses a significant risk to the integrity of systems that rely on tar-fs for archive extraction, particularly in development, deployment pipelines, or container environments. Unauthorized file overwrites can lead to code injection, configuration corruption, or disruption of application behavior. This can facilitate further attacks such as privilege escalation, persistent backdoors, or disruption of critical services. Organizations in sectors with high reliance on Node.js and JavaScript ecosystems—such as finance, telecommunications, and technology—may be particularly vulnerable. The lack of required authentication and user interaction increases the risk of automated exploitation if malicious tar files are introduced via supply chain attacks, compromised repositories, or untrusted uploads. Although no known exploits exist yet, the vulnerability’s characteristics make it a likely target for attackers aiming to compromise European infrastructure or intellectual property.
Mitigation Recommendations
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.
Affected Countries
Germany, United Kingdom, France, Netherlands, Sweden, Ireland
CVE-2024-12905: CWE-59 Improper Link Resolution Before File Access ('Link Following')
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.
AI-Powered Analysis
Technical Analysis
CVE-2024-12905 is a vulnerability classified under CWE-59 (Improper Link Resolution Before File Access) and CWE-22 (Path Traversal) found in the tar-fs package, a Node.js module used for extracting tar archives. The flaw arises when the package processes maliciously crafted tar files containing symbolic links or path traversal sequences. During extraction, the package fails to properly resolve these links or restrict pathnames, allowing files to be written or overwritten outside the intended extraction directory. This can lead to unauthorized modification of arbitrary files on the host system, potentially overwriting critical system or application files. The vulnerability affects 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. The CVSS 3.1 base score is 7.5, reflecting a high severity due to network attack vector, low attack complexity, no privileges required, and no user interaction needed. The impact is primarily on integrity, as attackers can alter files without authorization. No confidentiality or availability impact is indicated. No known exploits have been reported in the wild as of the publication date. The vulnerability is relevant for any application or service that uses tar-fs to extract tar archives, especially in automated or server-side environments where untrusted tar files might be processed.
Potential Impact
For European organizations, this vulnerability poses a significant risk to the integrity of systems that rely on tar-fs for archive extraction, particularly in development, deployment pipelines, or container environments. Unauthorized file overwrites can lead to code injection, configuration corruption, or disruption of application behavior. This can facilitate further attacks such as privilege escalation, persistent backdoors, or disruption of critical services. Organizations in sectors with high reliance on Node.js and JavaScript ecosystems—such as finance, telecommunications, and technology—may be particularly vulnerable. The lack of required authentication and user interaction increases the risk of automated exploitation if malicious tar files are introduced via supply chain attacks, compromised repositories, or untrusted uploads. Although no known exploits exist yet, the vulnerability’s characteristics make it a likely target for attackers aiming to compromise European infrastructure or intellectual property.
Mitigation Recommendations
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.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- seal
- Date Reserved
- 2024-12-23T13:53:01.494Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 690904b000ff46172d4a0e04
Added to database: 11/3/2025, 7:38:24 PM
Last enriched: 11/3/2025, 7:48:08 PM
Last updated: 12/16/2025, 11:50:04 PM
Views: 32
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-14766: Out of bounds read and write in Google Chrome
UnknownCVE-2025-14765: Use after free in Google Chrome
UnknownCVE-2025-34288: CWE-732 Incorrect Permission Assignment for Critical Resource in Nagios Enterprises Nagios XI
HighCVE-2025-68274: CWE-476: NULL Pointer Dereference in emiago sipgo
HighCVE-2025-64520: CWE-862: Missing Authorization in glpi-project glpi
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.