Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-59343: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in mafintosh tar-fs

0
High
VulnerabilityCVE-2025-59343cvecve-2025-59343cwe-22cwe-61
Published: Wed Sep 24 2025 (09/24/2025, 17:43:34 UTC)
Source: CVE Database V5
Vendor/Project: mafintosh
Product: 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

AILast updated: 11/03/2025, 20:37:28 UTC

Technical Analysis

CVE-2025-59343 is a path traversal vulnerability classified under CWE-22 and CWE-61 found in the mafintosh tar-fs library, which provides filesystem bindings for tar-stream in Node.js environments. The vulnerability exists in versions prior to 3.1.1, 2.1.3, and 1.16.5, where the symlink validation mechanism can be bypassed if the destination directory is predictable and a specially crafted tarball is used. This flaw allows an attacker to write files outside the intended extraction directory by exploiting symbolic link handling during tarball extraction. The vulnerability does not require any privileges, user interaction, or authentication, making it remotely exploitable by simply providing a malicious tar archive to a vulnerable system. The impact is significant because it can lead to arbitrary file overwrite, potentially compromising system integrity and enabling further attacks such as code execution or privilege escalation. Although no known exploits are currently reported in the wild, the CVSS 4.0 score of 8.7 (high severity) reflects the ease of exploitation and the potential impact on confidentiality and integrity. The issue has been addressed in versions 3.1.1, 2.1.4, and 1.16.6 of tar-fs. A temporary mitigation involves using the 'ignore' option to exclude non-file and non-directory entries during extraction, reducing the attack surface until patches are applied.

Potential Impact

For European organizations, this vulnerability poses a significant risk, particularly for those utilizing Node.js applications or development tools that depend on the tar-fs library for handling tarball extraction. Exploitation could allow attackers to overwrite critical system or application files, leading to system compromise, data integrity loss, or the introduction of malicious code. This is especially concerning for sectors with stringent data protection requirements such as finance, healthcare, and critical infrastructure. The ability to perform the attack without authentication or user interaction increases the threat level, as automated or remote exploitation is feasible. Additionally, organizations involved in software development, continuous integration/continuous deployment (CI/CD) pipelines, or package management may inadvertently expose themselves if vulnerable versions are used in build or deployment processes. The lack of known exploits in the wild suggests a window of opportunity for defenders to patch systems before active exploitation begins.

Mitigation Recommendations

European organizations should immediately upgrade all instances of tar-fs to versions 3.1.1, 2.1.4, or 1.16.6 or later, depending on their current version branch. Until patches can be applied, configure tar-fs to use the 'ignore' option to exclude non-file and non-directory entries during extraction, mitigating symlink bypass risks. Conduct thorough audits of software dependencies and supply chains to identify and remediate vulnerable versions of tar-fs, including transitive dependencies in Node.js projects. Implement strict validation and integrity checks on all tarball sources, especially those from untrusted or external origins. Incorporate runtime monitoring to detect unusual file system modifications indicative of exploitation attempts. For CI/CD environments, enforce sandboxing and least privilege principles to limit the impact of potential exploitation. Finally, maintain up-to-date threat intelligence feeds to monitor for emerging exploit activity related to this vulnerability.

Need more detailed analysis?Get Pro

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: 11/3/2025, 8:37:28 PM

Last updated: 11/20/2025, 1:51:07 AM

Views: 107

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats