CVE-2026-140245: node-tar: Symlink linkpath containment bypass via entry paths ending in '/.'
node-tar is a tar archive manipulation library for Node.js. From 7.5.5 until 8.0.0, symlink linkpath containment bypass via entry paths ending in '/.'. A crafted archive can create a symlink pointing outside the extraction directory using default options and without any warning. The affected security path includes [STRIPABSOLUTEPATH], linkpath, path.posix.dirname(entry.path). 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 installations are affected?
The issue affects npm/tar versions from 7.5.5 up to, but not including, 8.0.0. Version 8.0.0 fixes the issue.
Does exploitation require non-default extraction settings or a warning bypass?
No. A crafted archive can create a symlink outside the extraction directory using default options and without any warning.
What must an attacker provide to exploit this issue?
An attacker needs to supply a crafted tar archive containing an entry path ending in '/.' that triggers the symlink linkpath containment bypass during extraction.