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)
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
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 →