CVE-2026-140250 — Tar — CWE-22 · CWE-59
### Summary With default options, `tar.x()` in `[email protected]` (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. ### Details ### Malicious archive Three entries, no file contents needed: ``` sub/ Directory sub/up SymbolicLink -> .. lexical: "sub/.." = "." (inside) esc SymbolicLink -> sub/up/.. lexical: "sub/up/.." = "sub" (inside) ``` On disk, the kernel resolves `esc` as `sub/up` → `<cwd>`, then `..` → **par
### Summary With default options, `tar.x()` in `[email protected]` (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. ### Details ### Malicious archive Three entries, no file contents needed: ``` sub/ Directory sub/up SymbolicLink -> .. lexical: "sub/.." = "." (inside) esc SymbolicLink -> sub/up/.. lexical: "sub/up/.." = "sub" (inside) ``` On disk, the kernel resolves `esc` as `sub/up` → `<cwd>`, then `..` → **par
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-140250
CVSS 7.2/10 · HIGH · 01.12.2026
CWE: CWE-22, CWE-59
Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Path Traversal / LFI
Summary: node-tar is a tar archive manipulation library for Node.js. From 7.5.5 until 8.0.0, tar.x incorrectly validates symbolic link targets when an archive contains chained symbolic links. An attacker who can supply a crafted archive can cause extraction to create a symbolic link that resolves outside the extraction directory.
⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · user interaction required (UI:R) · low attack complexity (AC:L).
🌍 REAL WORLD IMPACT
Partial confidentiality disclosure (C:L); data can be modified or deleted; reduced availability or partial DoS (A:L).
🛡️ REMEDIATION
→ Apply the vendor-released patch immediately.
→ Use realpath() canonicalization, implement allowlists.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
⚠️ This week (7 days) — High risk, anonymous remote.
────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]