Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. tar
  4. ›
  5. CVE-2026-140250

CVE-2026-140250: node-tar: Symlink containment bypass via chained symlinks lets tar.x() create links that resolve outside the extraction directory (regression since 7.5.5)

December 2, 2026

With default options, tar.x() in tar@7.5.22 (and every release since 7.5.5) extracts a symbolic link that resolves outside the extraction directory when the link target passes through another symlink from the same archive and then uses .. — for example sub/up -> .. followed by esc -> sub/up/... Both symlink-target checks collapse .. lexically before considering symlinks, so the intermediate symlink is never seen, while the kernel resolves it before applying ... With enough nesting the extracted link resolves to /.

This breaks the README guarantee that “Link and SymbolicLink entries are not allowed to target locations outside of the extraction folder”, and gives any application that later reads or writes extracted paths file read/write outside the extraction root (the same impact model as GHSA-9ppj-qmqm-q256). It is a regression of the containment added for GHSA-8qq5-rm4j-mr97 (7.5.3–7.5.4 reject the chain; 7.5.5–7.5.22 accept it), and it also bypasses the [SYMLINK] check added for GHSA-83g3-92jg-28cx. A self-contained PoC, measured version matrix, and a remote-read deployment example are below.

References

  • github.com/advisories/GHSA-3wwj-8j6r-q339
  • github.com/isaacs/node-tar/commit/23b368128b6cf7d4c26f2e302c0e4a82f70a6e3d
  • github.com/isaacs/node-tar/releases/tag/v8.0.0
  • github.com/isaacs/node-tar/security/advisories/GHSA-3wwj-8j6r-q339
  • nvd.nist.gov/vuln/detail/CVE-2026-140250

Code Behaviors & Features

Detect and mitigate CVE-2026-140250 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 7.5.5 before 8.0.0

Fixed versions

  • 8.0.0

Solution

Upgrade to version 8.0.0 or above.

Impact 7.6 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')

Source file

npm/tar/CVE-2026-140250.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 02 Dec 2026 12:16:11 +0000.