Summary
tar-fs has a symlink validation bypass if destination directory is predictable with a specific tarball
Workarounds
You can use the ignore option to ignore non files/directories.
ignore (_, header) {
// pass files & directories, ignore e.g. symlinks
return header.type !== 'file' && header.type !== 'directory'
}
Credit
Reported by: Mapta / BugBunny_ai
Impact
v3.1.0, v2.1.3, v1.16.5 and below
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Has been patched in 3.1.1, 2.1.4, and 1.16.6
Frequently Asked Questions
- What is CVE-2025-59343? CVE-2025-59343 is a high-severity path traversal vulnerability in tar-fs (npm), affecting versions >= 3.0.0, < 3.1.1. It is fixed in 3.1.1, 2.1.4, 1.16.6. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- Which versions of tar-fs are affected by CVE-2025-59343? tar-fs (npm) versions >= 3.0.0, < 3.1.1 is affected.
- Is there a fix for CVE-2025-59343? Yes. CVE-2025-59343 is fixed in 3.1.1, 2.1.4, 1.16.6. Upgrade to this version or later.
- Is CVE-2025-59343 exploitable, and should I be worried? Whether CVE-2025-59343 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-59343 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-59343?
- Upgrade
tar-fsto 3.1.1 or later - Upgrade
tar-fsto 2.1.4 or later - Upgrade
tar-fsto 1.16.6 or later
- Upgrade