All vulnerabilities

npm

CVE-2026-140236

node-tar: Archive framing differential from PAX size still being applied to GNU/PAX meta entries via ReadEntry and related size/precedence inconsistencies

Severity
High
Published
2 Dec 2026
Last changed
2 Dec 2026
Added to UpHeron
2 Dec 2026
Fixed in
8.0.0
Weakness
CWE-436
Also known as
GHSA-qv2w-fc3h-pm27
Sources
OSV.dev and GitHub

Description

The GHSA-vmf3 fix (7.5.16, commit 21a8220) stopped Header.decode from applying extended-header values to non-file blocks. ReadEntry, however, still copies the PAX size onto meta entries (GNU long-name/long-link and PAX headers), and the parser uses that value to decide how many bytes belong to the meta entry. node-tar can therefore frame an archive differently from other tar implementations. Three related places in the same code take sizes or precedence from inconsistent sources.

An attacker who supplies an archive can make node-tar see different entries from other tar tools, for example a scanner or policy check run before extraction. A file the check didn't see can then be extracted. VULN-004 lets the meta-entry memory limit be exceeded. VULN-003 carries the inconsistency into archives node-tar itself produces from untrusted input.

From the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
tarnpm · osv:npm:tar
  • Every version before 8.0.0

About tar

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

References