CVE-2026-140250
### 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 `..` → **parent of `<cwd>`**. ### Root cause 1 — lexical escape check in `[STRIPABSOLUTEPATH]` `src/unpack.ts:284-291` at v7.5.22 (`dist/commonjs/unpack.js:278-281`): ```ts // Resolve linkpath relative to the entry's directory. // `path.posix` is safe to use because we're operating on // tar paths, not a filesystem. const entryDir = path.posix.dirname(entry.path) const resolved = path.posix.normalize( path.posix.join(entryDir, parts.join('/')), ) // If the resolved path escapes (starts with ..), reject it if (re
Properties
- Summary
- node-tar: Symlink containment bypass via chained symlinks lets tar.x() create links that resolve outside the extraction directory (regression since 7.5.5)
- Severity
- high
- Nvd fetched at
- 2026-12-02T06:37:54.190518+00:00
- Cvss score
- 7.2
- Cvss severity
- HIGH
- Retrieved at
- 2026-12-02T06:39:20+00:00
- Ghsa published
- 2026-12-02T00:54:08Z
- Source url
- https://github.com/advisories/GHSA-3wwj-8j6r-q339
- Ghsa updated
- 2026-12-02T00:54:09Z
- Ghsa id
- GHSA-3wwj-8j6r-q339
- Last source
- GitHub Advisory Database
- Score
- 7.2
- Cvss version
- 4.0
- Cve id
- CVE-2026-140250
- Cvss 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
- First seen by Signal
- 2026-12-01T22:36:00+00:00
- Name
- CVE-2026-140250
- Is ghsa only
- false
- 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
- Published at
- 2026-12-01T19:17:14.760
Related Entities (4)
HAS_WEAKNESS (2)
AFFECTS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph