CVE-2026-140243: node-tar: Symlink escape from the extraction directory via a trailing `/.` in the entry path
node-tar is a tar archive manipulation library for Node.js. From 7.5.5 until 8.0.0, there is a symlink escape from the extraction directory via a trailing /. in the entry path. Any application that extracts attacker-supplied tarballs with tar.x() / tar.extract() and then reads, serves, copies or rewrites the extracted files can be pointed at an arbitrary file outside the extraction directory. 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 deployments are exposed?
Applications using node-tar versions from 7.5.5 up to, but not including, 8.0.0 are affected when they extract attacker-supplied tarballs with tar.x() or tar.extract() and subsequently read, serve, copy, or rewrite extracted files.
What must an attacker control to exploit this issue?
The attacker must be able to supply a tar archive that the application extracts. Exploitation depends on the application performing follow-on operations on the extracted files.
What should teams do if they are using an affected release?
Upgrade node-tar to version 8.0.0, which fixes the issue. Until then, avoid extracting attacker-supplied tarballs in workflows that read, serve, copy, or rewrite the resulting files.