All vulnerabilities

npm

CVE-2026-140251

node-tar async extraction deadlocks permanently when an entry's linkpath is a hierarchical relative of its own path

Severity
High
Published
2 Dec 2026
Last changed
2 Dec 2026
Added to UpHeron
2 Dec 2026
Fixed in
8.0.0
Weakness
CWE-667CWE-833
Also known as
GHSA-98v3-7xjr-fg83
Sources
OSV.dev and GitHub

Description

An unauthenticated remote-input denial of service allows a crafted tar archive of about 1.5 KB to permanently and silently hang node-tar's default asynchronous extraction. When a Link or SymbolicLink entry has a linkpath that is an ancestor (or descendant) directory of the entry's own path, the internal path-reservation queue enters an unsatisfiable state. The promise returned by tar.x() / tar.extract() never resolves or rejects, the stream never emits end / finish / close, and no warning is raised. Every entry after the poison entry is silently skipped.

Async Unpack serialises filesystem work through PathReservations (src/path-reservations.ts). reserve([entry.path, entry.linkpath], fn) registers each reserved path as a plain function at that path's queue key, and every ancestor directory of each path as a Set at that directory's queue key.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
tarnpm · osv:npm:tar
  • From 7.5.22 before 8.0.0

About tar

Weekly downloads (npm)
113,520,680npm, 1 Dec 2026

References