HIGHCVSS v4 7.1Vulnerability

CVE-2026-140234

### Summary Names are cut at the first NUL with `.replace(/\0.*/, '')`. Without the `s` flag, `.` doesn't match `\n`, `\r`, U+2028 or U+2029. If one of these follows the NUL, only part of the name is removed, and the NUL remains. The GHSA-gvwx-54wh-qm9j fix (7.5.17, commit 7a635c2) added this regex for PAX values on the assumption that PAX lines can't contain line terminators. The same regex is also used for ustar names and for GNU long-name/long-link data. ### Details | # | Location | Default options | |---|---|---| | VULN-006 | `src/header.ts:358` (ustar names); `src/parse.ts:390` (GNU `L`), `:397` (GNU `K`, same regex, not tested separately) | Yes (crash in async `x`); `strip` for the differential | | VULN-021 | `src/pax.ts:179` (the GHSA-gvwx fix site): CR, U+2028 and U+2029 still end the match | Yes (crash); `strip` for the differential | ### Proof of concept `exploit_tests/test_vuln_006_*` and `_021_`. Each runs a control and an attack against the unmodified 7.5.22 build, with output recorded in `exploit_tests/evidence/`. All were run on macOS. ### Impact In async extraction, a name that still contains a NUL reaches `fs` and throws, which crashes a process that doesn't catch it (the outcome GHSA-gvwx-54wh-qm9j addressed). With `strip`, the surviving characters make node-tar's view of the name differ from other tools'.

Properties

Summary
node-tar: Incomplete NUL-byte truncation in ustar, GNU, and PAX names causes name differentials and async crashes
Severity
high
Nvd fetched at
2026-12-02T06:37:54.190518+00:00
Cvss score
7.1
Cvss severity
HIGH
Retrieved at
2026-12-02T06:39:20+00:00
Ghsa published
2026-12-02T01:45:20Z
Source url
https://github.com/advisories/GHSA-wpwg-r92p-fjjh
Ghsa updated
2026-12-02T01:45:21Z
Ghsa id
GHSA-wpwg-r92p-fjjh
Last source
GitHub Advisory Database
Score
7.1
Cvss version
4.0
Cve id
CVE-2026-140234
Cvss vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
First seen by Signal
2026-12-01T18:35:21+00:00
Name
CVE-2026-140234
Is ghsa only
false
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Published at
2026-12-01T18:17:26.853

Related Entities (3)

AFFECTS (1)

→[Software]npm/tar

VULNERABLE_TO (1)

←[Software]npm/tar

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-140234 (CVSS v4 7.1) — Ninja Signal Threat Intelligence | Ninja Signal