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.
Affected software
| Software | Affected versions |
|---|---|
tarnpm · osv:npm:tar |
|
About tar
- Weekly downloads (npm)
- 113,520,680npm, 1 Dec 2026
Vulnerabilities in tar
- In our list
- 18
- Published in the last 12 months
- 18
- Critical, last 12 months
- 0
- High, last 12 months
- 17
- Known exploited
- 0
- CVE-2026-140234node-tar: Incomplete NUL-byte truncation in ustar, GNU, and PAX names causes name differentials and async crashesHigh 2 Dec 2026
- CVE-2026-140235node-tar parses PAX extended headers by newline-splitting instead of length-delimiting, causing record dropping and forged-field injectionHigh 2 Dec 2026
- CVE-2026-140237node-tar: ReadEntry pending PAX size reapplication permits metadata-body file smugglingMedium 2 Dec 2026
- CVE-2026-140238node-tar: Newline injection in PAX extended-header records enables entry-attribute forgery (path overwrite → npm postinstall RCE on Windows)High 2 Dec 2026
- CVE-2026-140239node-tar: Global PAX extended header injects attacker-controlled linkpath into tar.Parser entries, bypassing strict-mode validationHigh 2 Dec 2026
- CVE-2026-140240node-tar: A small archive exhausts memory or CPU through path-reservation bookkeepingHigh 2 Dec 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-140236
- GitHub Advisory Database https://github.com/advisories/GHSA-qv2w-fc3h-pm27