CVE-2025-59343: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in mafintosh tar-fs
tar-fs provides filesystem bindings for tar-stream. Versions prior to 3.1.1, 2.1.3, and 1.16.5 are vulnerable to symlink validation bypass if the destination directory is predictable with a specific tarball. This issue has been patched in version 3.1.1, 2.1.4, and 1.16.6. A workaround involves using the ignore option on non files/directories.
AI Analysis
Technical Summary
CVE-2025-59343 is a high-severity path traversal vulnerability (CWE-22) affecting the 'tar-fs' library, which provides filesystem bindings for the 'tar-stream' Node.js module. The vulnerability exists in versions prior to 3.1.1, 2.1.3, and 1.16.5 of tar-fs. It allows an attacker to bypass symlink validation when extracting tarballs if the destination directory is predictable and the tarball is crafted specifically to exploit this behavior. This improper limitation of pathname to a restricted directory means that an attacker can potentially write files outside the intended extraction directory, leading to arbitrary file overwrite or creation. This can compromise system integrity by overwriting critical files or planting malicious binaries or scripts. The vulnerability does not require authentication or user interaction and can be exploited remotely if an attacker can supply a malicious tarball to a system using an affected version of tar-fs. The issue has been patched in versions 3.1.1, 2.1.4, and 1.16.6. A temporary workaround involves using the 'ignore' option to exclude non-file and non-directory entries during extraction, which can mitigate symlink exploitation. The CVSS v4.0 score is 8.7 (high), reflecting network attack vector, low attack complexity, no privileges or user interaction required, and a significant impact on integrity. No known exploits are currently reported in the wild, but the severity and ease of exploitation make this a critical patching priority for affected environments.
Potential Impact
For European organizations, the impact of this vulnerability can be significant, especially for those relying on Node.js applications that use tar-fs for handling tarball extraction, such as CI/CD pipelines, container image processing, or software deployment tools. Successful exploitation could lead to arbitrary file writes outside intended directories, enabling attackers to overwrite configuration files, implant backdoors, or escalate privileges. This threatens system integrity and potentially availability if critical system files are corrupted. Confidentiality impact is limited but possible if attackers overwrite files to gain persistent access or exfiltrate data. Given the widespread use of Node.js in European enterprises, including in financial services, manufacturing, and government sectors, this vulnerability could be leveraged to disrupt operations or facilitate further attacks. The lack of required authentication and user interaction increases risk, especially in automated environments processing untrusted tarballs. Organizations using containerization or automated deployment pipelines are particularly at risk if they do not validate or sanitize tarball contents properly.
Mitigation Recommendations
European organizations should immediately upgrade tar-fs to versions 3.1.1, 2.1.4, or 1.16.6 or later to apply the official patch. Until upgrades are possible, implement the workaround by configuring tar-fs to use the 'ignore' option to exclude non-file and non-directory entries, reducing symlink exploitation risk. Additionally, enforce strict validation and sanitization of all tarball inputs, especially those from untrusted sources. Employ runtime monitoring to detect unusual file system writes outside expected directories. Integrate security scanning in CI/CD pipelines to detect vulnerable tar-fs versions and malicious tarball payloads. Limit permissions of processes extracting tarballs to minimize potential damage from arbitrary file writes. Finally, maintain an inventory of Node.js dependencies and monitor for updates or advisories related to tar-fs and tar-stream components.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Poland
CVE-2025-59343: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in mafintosh tar-fs
Description
tar-fs provides filesystem bindings for tar-stream. Versions prior to 3.1.1, 2.1.3, and 1.16.5 are vulnerable to symlink validation bypass if the destination directory is predictable with a specific tarball. This issue has been patched in version 3.1.1, 2.1.4, and 1.16.6. A workaround involves using the ignore option on non files/directories.
AI-Powered Analysis
Technical Analysis
CVE-2025-59343 is a high-severity path traversal vulnerability (CWE-22) affecting the 'tar-fs' library, which provides filesystem bindings for the 'tar-stream' Node.js module. The vulnerability exists in versions prior to 3.1.1, 2.1.3, and 1.16.5 of tar-fs. It allows an attacker to bypass symlink validation when extracting tarballs if the destination directory is predictable and the tarball is crafted specifically to exploit this behavior. This improper limitation of pathname to a restricted directory means that an attacker can potentially write files outside the intended extraction directory, leading to arbitrary file overwrite or creation. This can compromise system integrity by overwriting critical files or planting malicious binaries or scripts. The vulnerability does not require authentication or user interaction and can be exploited remotely if an attacker can supply a malicious tarball to a system using an affected version of tar-fs. The issue has been patched in versions 3.1.1, 2.1.4, and 1.16.6. A temporary workaround involves using the 'ignore' option to exclude non-file and non-directory entries during extraction, which can mitigate symlink exploitation. The CVSS v4.0 score is 8.7 (high), reflecting network attack vector, low attack complexity, no privileges or user interaction required, and a significant impact on integrity. No known exploits are currently reported in the wild, but the severity and ease of exploitation make this a critical patching priority for affected environments.
Potential Impact
For European organizations, the impact of this vulnerability can be significant, especially for those relying on Node.js applications that use tar-fs for handling tarball extraction, such as CI/CD pipelines, container image processing, or software deployment tools. Successful exploitation could lead to arbitrary file writes outside intended directories, enabling attackers to overwrite configuration files, implant backdoors, or escalate privileges. This threatens system integrity and potentially availability if critical system files are corrupted. Confidentiality impact is limited but possible if attackers overwrite files to gain persistent access or exfiltrate data. Given the widespread use of Node.js in European enterprises, including in financial services, manufacturing, and government sectors, this vulnerability could be leveraged to disrupt operations or facilitate further attacks. The lack of required authentication and user interaction increases risk, especially in automated environments processing untrusted tarballs. Organizations using containerization or automated deployment pipelines are particularly at risk if they do not validate or sanitize tarball contents properly.
Mitigation Recommendations
European organizations should immediately upgrade tar-fs to versions 3.1.1, 2.1.4, or 1.16.6 or later to apply the official patch. Until upgrades are possible, implement the workaround by configuring tar-fs to use the 'ignore' option to exclude non-file and non-directory entries, reducing symlink exploitation risk. Additionally, enforce strict validation and sanitization of all tarball inputs, especially those from untrusted sources. Employ runtime monitoring to detect unusual file system writes outside expected directories. Integrate security scanning in CI/CD pipelines to detect vulnerable tar-fs versions and malicious tarball payloads. Limit permissions of processes extracting tarballs to minimize potential damage from arbitrary file writes. Finally, maintain an inventory of Node.js dependencies and monitor for updates or advisories related to tar-fs and tar-stream components.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-09-12T12:36:24.636Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 68d42e6da3ef9dc8da572d28
Added to database: 9/24/2025, 5:46:21 PM
Last enriched: 10/4/2025, 12:17:04 AM
Last updated: 10/7/2025, 6:35:30 AM
Views: 64
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-11354: Unrestricted Upload in code-projects Online Hotel Reservation System
MediumCVE-2025-10162: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Admin and Customer Messages After Order for WooCommerce: OrderConvo
UnknownCVE-2025-11353: Unrestricted Upload in code-projects Online Hotel Reservation System
MediumCVE-2025-11362: Allocation of Resources Without Limits or Throttling in pdfmake
HighCVE-2025-11352: Unrestricted Upload in code-projects Online Hotel Reservation System
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.