CVE-2026-140234: node-tar Incomplete NUL-byte Truncation Vulnerability
HIGHCVE-2026-140234 is a HIGH incomplete nul-byte truncation vulnerability (CWE-158: Improper Neutralization of Null Byte or NUL Character) affecting node-tar libraries in the npm ecosystem. The issue involves incomplete nul-byte truncation in ustar, gnu, and pax names causes name differentials and async crashes. Remediation is available by upgrading affected packages to version 8.0.0.
CVE-2026-140234 at a Glance
How to Fix CVE-2026-140234
To remediate this vulnerability, upgrade all affected node-tar dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install tar@8.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls tar
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-140234, inspect your project dependencies using npm:
npm ls tar
Analyze the terminal output to locate any version of node-tar in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.0.0), your application is affected.
Note: The npm ls tar command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-158: Improper Neutralization of Null Byte or NUL Character, where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes nul characters or null bytes when they are sent to a downstream component. In node-tar, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-140234 Affected node-tar Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tar
|
npm |
< 8.0.0
|
8.0.0
|
References
Frequently Asked Questions
What is CVE-2026-140234?
Which node-tar versions are affected?
What version fixes CVE-2026-140234?
Is tar affected?
What CWE is associated with CVE-2026-140234?
How can I check npm dependencies for CVE-2026-140234?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wpwg-r92p-fjjh",
"modified" : "2026-12-02T01:45:20Z",
"published" : "2026-12-02T01:45:20Z",
"aliases" : [ "CVE-2026-140234" ],
"summary" : "node-tar: Incomplete NUL-byte truncation in ustar, GNU, and PAX names causes name differentials and async crashes",
"details" : "### Summary\n\nNames 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.\n\n\n### Details\n\n| # | Location | Default options |\n|---|---|---|\n| 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 |\n| 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 |\n\n\n### Proof of concept\n\n`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.\n\n\n### Impact\n\nIn 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'.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "tar"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "8.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/isaacs/node-tar/security/advisories/GHSA-wpwg-r92p-fjjh"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-140234"
}, {
"type" : "WEB",
"url" : "https://github.com/isaacs/node-tar/commit/f351e5b4a8916bc8c8f821d0ad926a17d26ea237"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/isaacs/node-tar"
}, {
"type" : "WEB",
"url" : "https://github.com/isaacs/node-tar/releases/tag/v8.0.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-158" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-02T01:45:20Z",
"nvd_published_at" : "2026-12-01T18:17:26Z"
}
}