node-tar: Newline injection in PAX extended-header records enables entry-attribute forgery (path overwrite → npm postinstall RCE on Windows)
CVE-2026-140238
Summary node-tar's PAX extended-header record framing is not enforced by byte length, so a newline embedded in any PAX value is reinterpreted on extraction as a record boundary. This lets an attacker forge arbitrary PAX records (path, linkpath, size, uid, ...) for an entry, overriding its real header-derived attributes. In the most damaging case this rewrites an entry's path, writing content to a location the archive's structure did not declare. This is distinct from the already-published PAX issues: GHSA-gvwx-54wh-qm9j is NUL-byte-in-PAX causing a DoS crash; this report is newline-in-PAX causing silent record forgery / attribute override — an integrity/path-overwrite primitive, not a crash. Verified end-to-end: overwriting package.json inside an installed npm package and executing an injected postinstall on a real Windows machine. Details Affected versions All versions up to and including 7.5.22 (reproduced on current main, commit 2a22bfc). Root cause (two complementary bugs) Extraction side — src/pax.ts parseKV (primary): the PAX body is split on \n and each line is validated only by a per-line self-consistency check (declaredLen === byteLength(line) + 1). The PAX format frames…
Assessment
- CVSS
- 7.2 (v4.0)
- Severity
- High
- EPSS
- 0% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 1 December 2026
- Last updated
- 2 December 2026
- Weakness
- CWE-22, CWE-93
- Assigner
- GitHub_M
CVSS vectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
At the source
References
- https://github.com/isaacs/node-tar/security/advisories/GHSA-mpg7-vg3p-wc3m
- https://nvd.nist.gov/vuln/detail/CVE-2026-140238
- https://github.com/isaacs/node-tar/commit/f351e5b4a8916bc8c8f821d0ad926a17d26ea237
- https://github.com/isaacs/node-tar/releases/tag/v8.0.0
- https://github.com/advisories/GHSA-mpg7-vg3p-wc3m
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-140238