node-tar 8.0.0 Patches Symlink Bypass in Archive Extraction

The node-tar library released version 8.0.0 to fix a high-severity vulnerability (CVE-2026-140245) that allowed attackers to bypass symlink containment checks. The flaw, affecting versions 7.5.5 through 7.9.9, enabled crafted archives to create symlinks pointing outside the extraction directory using default options. The fix normalizes entry paths to prevent this escape, though the release also introduced breaking API changes.
Key points
- CVE-2026-140245 affects node-tar versions 7.5.5 up to, but not including, 8.0.0.
- The vulnerability allows a crafted archive to create a symlink pointing outside the extraction directory using default options without emitting a warning.
- The flaw is rated 7.2 (High) on the CVSS 4.0 scale, with high integrity impact and low confidentiality and availability impact.
- The issue stems from improper limitation of a pathname to a restricted directory (CWE-22), specifically involving entry paths ending in '/.'.
- The fix in version 8.0.0 normalizes the entry path before resolving the symlink target and rejects linkpaths containing '..' after a named path portion.
- Version 8.0.0 is a major release that dropped support for Node.js versions below 22 and removed runtime dependencies, introducing breaking API changes.
Background
This is the latest in a series of high-severity vulnerabilities patched in the node-tar library. Earlier in December 2026, version 8.0.0 also fixed CVE-2026-140239 (PAX header injection) and CVE-2026-140243 (symlink escape). A subsequent patch, version 8.0.2, addressed CVE-2026-140240, a memory exhaustion flaw. The current vulnerability, CVE-2026-140245, was reported by 'Figo5' and published as GitHub Security Advisory GHSA-jmj2-9c5q-vw73 on November 28, 2026, the same day the fix was released. It shares the same impact model as a previously accepted vulnerability, CVE-2026-31802.
Why it matters
node-tar is a widely used library for manipulating tar archives in Node.js applications. A vulnerability allowing symlink containment bypass can lead to arbitrary file access or modification outside the intended extraction directory, potentially compromising system integrity. The high CVSS score and the fact that the exploit works with default options make this a critical issue for developers using affected versions.
What to watch
Developers using node-tar versions 7.5.5 through 7.9.9 should upgrade to version 8.0.0 or later to mitigate this vulnerability. However, they should be aware that version 8.0.0 introduced breaking API changes, including the removal of callbacks and Node.js streams in favor of promises and web streams, and dropped support for Node.js versions below 22. Further updates, such as version 8.0.2, have addressed additional issues like memory exhaustion.
Want the full story? Read the original reporting
Read on CVEs | Zero Wire | Cloudflare Radar