node-tar: Symlink target escapes the extraction directory through an in-archive symlink chain
CVE-2026-140249
Summary Summary With default options, tar.x() in tar 7.5.5 through 7.5.23 (the latest release) creates a symbolic link that points outside the extraction directory, and raises no warning. The archive needs only a directory and two symlinks. This breaks the README's listed protection that "Link and SymbolicLink entries are not allowed to target locations outside of the extraction folder." This is not the TOCTOU case (no one but tar touches the extraction folder) and not an old version: it reproduces on 7.5.23 and on main (eb92e17), with default options. Details x/ Directory x/y -> .. (resolves to cwd: allowed) l -> x/y/../secret.txt (checked as cwd/x/secret.txt; really cwd/../secret.txt) [STRIPABSOLUTEPATH] validates the lexically normalized linkpath, x/secret.txt, which is inside cwd. [SYMLINK] runs ENSURENOSYMLINK on path.resolve(...) of the linkpath, which also removes y/.. before checking, so it never sees that x/y is a symlink. [LINK] then creates the link with the raw linkpath, x/y/../secret.txt. The kernel resolves x/y first (to cwd), then applies .., so l points to cwd/../secret.txt. Repeating the x/y/ step reaches any absolute path: x/y/ × 8 followed by ../ × 16 and…
Assessment
- CVSS
- 7.2 (v4.0)
- Severity
- High
- EPSS
- 0.00942% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 2 December 2026
- Last updated
- 2 December 2026
- Weakness
- CWE-22, CWE-59
- Assigner
- GitHub_M
CVSS vectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
At the source
References
- https://github.com/isaacs/node-tar/security/advisories/GHSA-4pf9-5fpx-xmr6
- https://nvd.nist.gov/vuln/detail/CVE-2026-140249
- https://github.com/isaacs/node-tar/commit/23b368128b6cf7d4c26f2e302c0e4a82f70a6e3d
- https://github.com/isaacs/node-tar/releases/tag/v8.0.0
- https://github.com/advisories/GHSA-4pf9-5fpx-xmr6
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-140249