CVE Feed
7.2 High

node-tar: Symlink linkpath containment bypass via entry paths ending in '/.'

CVE-2026-140245

Summary A relative symlink linkpath is validated against path.posix.dirname(entry.path) but created at path.resolve(cwd, entry.path). An entry named 'x/.' shifts the check's base one level shallower, so one '..' is absorbed by the check and the link still escapes the extraction directory, with default options and no warning. Regression in 7.5.5-7.5.22 (introduced by the #450 fix). Details Mechanism [STRIPABSOLUTEPATH] resolves a relative linkpath against path.posix.dirname(entry.path) (src/unpack.ts:286), but the link is created at path.resolve(cwd, entry.path) (src/unpack.ts:359). For an entry name ending in /., dirname returns a base one level shallower than the directory the link is actually created in. The check therefore normalises x/../outside/secret.txt to outside/secret.txt, which passes startsWith('../') at :291, while the kernel resolves the link from cwd and lands outside the destination. Affected >= 7.5.5, ../outside/secret.txt realpath resolves outside dest warnings: [] ctrl path 'x' (no '/.') rejected: "linkpath escapes extraction directory" strip strip:1 (pacote/npm path) x -> ../outside/secret.txt warnings: [] 7.5.4 baseline rejected: "linkpath contains '..'" The…

Assessment

CVSS
7.2 (v4.0)
Severity
High
EPSS
0% 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
Affected
isaacs · node-tar · tar
Weakness
CWE-22
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

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
Before you submit *

Query this programmatically

Agents can read this through the MCP endpoint, or over HTTP:

curl https://cve.zerocrew.in/api/cve/CVE-2026-140245