
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-140245 is a symlink linkpath containment bypass vulnerability in the node-tar npm package (published as tar on npm) affecting versions >= 7.5.5 and < 8.0.0. A crafted tar archive containing an entry path ending in /. can create a symbolic link pointing outside the intended extraction directory, bypassing containment checks silently with default options and no warning. The vulnerability was disclosed on November 28, 2026, and fixed in version 8.0.0. It carries a CVSS v4.0 base score of 7.2 (High) (GitHub Advisory, Feedly).
The root cause is a path traversal flaw (CWE-22) introduced by the #450 relative-linkpath fix in node-tar 7.5.5. The STRIPABSOLUTEPATH logic validates a relative symlink's linkpath against path.posix.dirname(entry.path), but the symlink is physically created at path.resolve(cwd, entry.path). When an entry path ends in /. (e.g., x/.), dirname returns a base one level shallower than the actual filesystem location of the link, causing the containment check to normalize x/../outside/secret.txt to outside/secret.txt — which passes the startsWith('../') guard — while the kernel resolves the link from cwd and lands outside the extraction directory. The fix in 8.0.0 normalizes entry.path before computing entryDir (using path.posix.normalize) and additionally rejects any .. segment appearing after a named path component (GitHub Advisory, Fix Commit).
A crafted archive can place a symlink outside the extraction directory without triggering any warning under default options. While node-tar itself does not follow the rogue symlink for subsequent writes (using O_NOFOLLOW and refusing symlink parents for mkdir), any consuming application that later writes through the extracted path will write to an unintended location outside the destination directory. This enables integrity compromise of arbitrary files writable by the process, with limited confidentiality impact (e.g., reading file existence via symlink resolution) and low availability impact, consistent with the CVSS v4.0 scoring (GitHub Advisory).
A proof-of-concept was included in the security advisory, demonstrating exploitation against the npm-published tar@7.5.22 with a single archive entry and default options. The PoC archive entry { path: 'x/.', type: 'SymbolicLink', linkpath: '../outside/secret.txt' } successfully creates an escaped symlink with no warnings. No in-the-wild exploitation has been reported, and the EPSS score is 0.0. The CVE status is listed as "Deferred" and it is not currently in the CISA KEV catalog (GitHub Advisory, Feedly).
SymbolicLink entry where path ends in /. (e.g., x/.) and linkpath points outside the extraction directory (e.g., ../outside/secret.txt).node-tar (npm package tar) versions 7.5.5–7.5.22 for extraction — for example, via file upload, package distribution, or a supply-chain vector.onwarn handler, no strict mode). The containment check passes because path.posix.dirname('x/.') returns x instead of the actual creation directory, allowing ../outside/secret.txt to pass the startsWith('../') guard.x (resolved from x/.) is created in the extraction directory pointing to ../outside/secret.txt, with no warning emitted.x) pointing to ../ paths./. or /./ (e.g., x/., esc/./) in tar files processed by the application.TAR_ENTRY_ERROR with message linkpath escapes extraction directory (patched versions) — absence of such warnings on vulnerable versions despite suspicious archives is itself an indicator.Upgrade the tar npm package to version 8.0.0 or later, which normalizes entry.path before computing the symlink containment base directory and rejects .. segments appearing after any named path component (node-tar v8.0.0 Release, Fix Commit). Note that v8.0.0 is a major release with breaking API changes (removal of callbacks, Node.js streams, sync option renamed, Node < 22 dropped), so review the migration guide before upgrading. No configuration-based workaround is available for the vulnerable versions; the only mitigation short of upgrading is to avoid extracting untrusted archives with affected versions.
The vulnerability was reported to the node-tar maintainers with AI assistance by researcher Figo5 and published as a GitHub Security Advisory (GHSA-jmj2-9c5q-vw73) on November 28, 2026. The advisory notes it is distinct from the previously accepted GHSA-9ppj-qmqm-q256 (CVE-2026-31802), which involved a malicious linkpath string, whereas this issue stems from a defect in entry-path base computation introduced by the #450 fix. No significant broader media coverage or social media discussion beyond standard CVE aggregator activity has been observed (GitHub Advisory).
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."