# CVE-2026-140238: node-tar: Newline injection in PAX extended-header records enables entry-attribute forgery (path overwrite → npm postinstall RCE on Windows)

- Severity: High 7.2 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-12-01T17:21:11.959Z
- Modified: 2026-12-02T01:45:50.774Z
- Also known as: GHSA-mpg7-vg3p-wc3m
- Weaknesses: CWE-22, CWE-93
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, newline splitting of PAX extended header records permits attacker-controlled entry attributes to be forged. Direct node-tar extraction without strip can overwrite a path within the extraction target. The npm execution chain additionally requires Windows strip:1 normalization, an overwrite of package.json, and later execution of the injected postinstall script; POSIX npm processing with strip:1 is not affected by that chain. This issue is fixed in version 8.0.0.

(As written by CVE List.)

## Affected

- isaacs node-tar: < 8.0.0
- tar (npm): before 8.0.0

## Every score

- GitHub_M: CVSS:4.0 7.2 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N`

## References

- <https://github.com/isaacs/node-tar/security/advisories/GHSA-mpg7-vg3p-wc3m> (exploit, web)
- <https://github.com/isaacs/node-tar/commit/f351e5b4a8916bc8c8f821d0ad926a17d26ea237> (web)
- <https://github.com/isaacs/node-tar/releases/tag/v8.0.0> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-140238> (advisory)
- <https://github.com/isaacs/node-tar> (package)

## Sources

- CVE List: [CVE-2026-140238](https://www.cve.org/CVERecord?id=CVE-2026-140238), CVE Terms of Use, modified 2026-12-01
- GitHub Advisory Database: [GHSA-mpg7-vg3p-wc3m](https://github.com/advisories/GHSA-mpg7-vg3p-wc3m), CC-BY-4.0, modified 2026-12-02
- NVD: [CVE-2026-140238](https://nvd.nist.gov/vuln/detail/CVE-2026-140238), Public domain, modified 2026-12-01

---

Page: https://cve.day/CVE-2026-140238 · Whole record: https://cve.day/CVE-2026-140238.json · Rebuilt by cve.day 2026-12-02T01:57:26.523Z
