CVE-2025-59343: Tar fs Tar-fs Has A Symlink Validation Vulnerability
HIGHCVE-2025-59343 is a HIGH tar-fs has a symlink validation vulnerability (CWE-61: UNIX Symbolic Link (Symlink) Following) affecting Tar fs libraries in the npm ecosystem. The issue involves tar-fs has a symlink validation bypass if destination directory is predictable with a specific tarball. Remediation is available by upgrading affected packages to version 3.1.1, 2.1.4, 1.16.6.
CVE-2025-59343 at a Glance
How to Fix CVE-2025-59343
To remediate this vulnerability, upgrade all affected Tar fs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install tar-fs@3.1.1
npm install tar-fs@2.1.4
npm install tar-fs@1.16.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls tar-fs
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-59343, inspect your project dependencies using npm:
npm ls tar-fs
Analyze the terminal output to locate any version of Tar fs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.1), your application is affected.
Note: The npm ls tar-fs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-61: UNIX Symbolic Link (Symlink) Following, where the product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. this could allow an attacker to cause the product to operate on unauthorized files. In Tar fs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-59343 Affected Tar fs Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tar-fs
|
npm |
≥ 3.0.0
< 3.1.1
|
3.1.1
|
|
tar-fs
|
npm |
≥ 2.0.0
< 2.1.4
|
2.1.4
|
|
tar-fs
|
npm |
< 1.16.6
|
1.16.6
|
References
Frequently Asked Questions
What is CVE-2025-59343?
Which Tar fs versions are affected?
What version fixes CVE-2025-59343?
Is tar-fs affected?
What CWE is associated with CVE-2025-59343?
How can I check npm dependencies for CVE-2025-59343?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vj76-c3g6-qr5v",
"modified" : "2025-11-03T21:34:35Z",
"published" : "2025-09-24T18:57:04Z",
"aliases" : [ "CVE-2025-59343" ],
"summary" : "tar-fs has a symlink validation bypass if destination directory is predictable with a specific tarball",
"details" : "### Impact\n v3.1.0, v2.1.3, v1.16.5 and below\n\n### Patches\nHas been patched in 3.1.1, 2.1.4, and 1.16.6\n\n### Workarounds\nYou can use the ignore option to ignore non files/directories.\n\n```js\n ignore (_, header) {\n // pass files & directories, ignore e.g. symlinks\n return header.type !== 'file' && header.type !== 'directory'\n }\n```\n\n### Credit\nReported by: Mapta / BugBunny_ai",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "tar-fs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.1.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "tar-fs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.1.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "tar-fs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.16.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mafintosh/tar-fs/security/advisories/GHSA-vj76-c3g6-qr5v"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59343"
}, {
"type" : "WEB",
"url" : "https://github.com/mafintosh/tar-fs/commit/0bd54cdf06da2b7b5b95cd4b062c9f4e0a8c4e09"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mafintosh/tar-fs"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2025/09/msg00028.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-61" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-24T18:57:04Z",
"nvd_published_at" : "2025-09-24T18:15:42Z"
}
}