CVE-2026-140249: node-tar: Symlink target escapes the extraction directory through an in-archive symlink chain
Summary With default options, tar.x() in tar 7.5.5 through 7.5.23 (the latest release) creates a symbolic link that points outside the extraction directory, and raises no warning. The archive needs only a directory and two symlinks. This breaks the README’s listed protection that “Link and SymbolicLink entries are not allowed to target locations outside of the extraction folder.”
This is not the TOCTOU case (no one but tar touches the extraction folder) and not an old version: it reproduces on 7.5.23 and on main (eb92e17), with default options.
References
Code Behaviors & Features
Detect and mitigate CVE-2026-140249 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 →