HIGHCVSS v4 7.1Vulnerability

CVE-2026-140240

### Summary The GHSA-f5x3-32g6-xq36 fix bounded the depth (component count) of `entry.path` with `maxDepth`. The path-reservation code still computes every ancestor prefix of each reserved path, and its cost grows with the number of components multiplied by the path length. That bound doesn't apply to `linkpath`, nor to long components within the depth limit. Reservation state and some caches are also never released for the life of an extraction. ### Details | # | Issue | Location | Default options | |---|---|---|---| | VULN-002 | `linkpath` has no depth or length bound and is reserved for every entry type. `getDirs` cost is quadratic in its length, so an archive of a few hundred bytes compressed aborts the Node process | `src/path-reservations.ts:25-38`, via `src/unpack.ts:729-734` | Yes (async `x`/`Unpack`) | | VULN-023 | Within `maxDepth`, very long components make the same `getDirs` computation exhaust memory (the depth fix bounds count, not length) | `src/path-reservations.ts:25-38`, via `src/unpack.ts:734` | Yes (async) | | VULN-009 | `PathReservations.#reservations` entries are never deleted, so ancestor strings for every entry are kept until the `Unpack` ends | `src/path-reservations.ts:64` | Yes (async) | | VULN-012 | The `normalizeUnicode` cache is capped by entry count (10k), not bytes, so long names make it large | `src/normalize-unicode.ts:5-35` | Yes (async) | | VULN-024 | `filesFilter` memoises every path prefix; memory grows with depth × length. The GHSA-r292 fix bounded recursion depth, not the memo | `src/list.ts:35-52` | Needs a file list | Not the same as open PR #470, which fixes a reservation deadlock when a linkpath is a parent of the entry path. ### Proof of concept `exploit_tests/test_vuln_002_*`, `_023_`, `_009_`, `_012_` and `_024_`. Each test runs a control archive and an attack archive against the unmodified 7.5.22 build, with output recorded in `exploit_tests/evidence/`. All were run on macOS. ### Impact Any service that extr

Properties

Severity
high
Summary
node-tar: A small archive exhausts memory or CPU through path-reservation bookkeeping
Nvd fetched at
2026-12-02T06:37:54.190518+00:00
Cvss severity
HIGH
Cvss score
7.1
Retrieved at
2026-12-02T06:39:20+00:00
Ghsa published
2026-12-02T01:23:10Z
Source url
https://github.com/advisories/GHSA-7c32-79xj-j3jp
Ghsa updated
2026-12-02T01:23:11Z
Ghsa id
GHSA-7c32-79xj-j3jp
Last source
GitHub Advisory Database
Score
7.1
Cvss version
4.0
Cve id
CVE-2026-140240
Cvss vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/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-01T18:35:21+00:00
Name
CVE-2026-140240
Is ghsa only
false
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/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-01T18:17:27.983

Related Entities (5)

AFFECTS (1)

→[Software]npm/tar

VULNERABLE_TO (1)

←[Software]npm/tar

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-140240 (CVSS v4 7.1) — Ninja Signal Threat Intelligence | Ninja Signal