CVE-2026-140246: node-tar: SymbolicLink extraction escapes the extraction directory on non-Windows hosts via a backslash separator differential
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, on non-Windows hosts, SymbolicLink extraction applies Windows-style backslash separator semantics during the linkpath containment check but passes the raw linkpath to the filesystem, where a backslash is an ordinary filename character. A crafted archive can therefore plant a link inside the extraction directory that resolves to a host path outside it. A later consumer can read through the link, but node-tar does not itself establish an arbitrary-write impact. This issue is fixed in version 8.0.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.0.0
Event History
Frequently Asked Questions
Which environments are affected?
The issue affects node-tar versions prior to 8.0.0 when extracting archives on non-Windows hosts. The vulnerable behavior depends on the difference between Windows-style backslash parsing during validation and filesystem handling of backslashes on non-Windows systems.
What must an attacker provide or control to exploit this issue?
An attacker needs to supply a crafted tar archive containing a SymbolicLink entry with a malicious linkpath. The archive must be extracted by an affected node-tar version on a non-Windows host.
What is the practical impact of a successful exploit?
The crafted archive can create a symbolic link within the extraction directory that resolves to a path outside that directory. A later consumer that follows or reads through the link may access the external target; node-tar itself does not establish an arbitrary-write impact.
How can this be remediated?
Upgrade npm/tar to version 8.0.0 or later. If upgrading is not immediately possible, do not extract untrusted archives with the affected library on non-Windows hosts, and prevent downstream consumers from following symbolic links created during extraction.