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
Description
Summary
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.
Details
| # | Issue | Location | Default options |
|---|---|---|---|
| VULN-001 | ReadEntry applies ex/gexsize to meta entries, and the parser uses it to frame the meta body. This is what GHSA-vmf3 meant to prevent, through a different code path | src/read-entry.ts:105-110 → src/parse.ts:241,246 | Yes (x, t, Parser, Unpack, UnpackSync) |
| VULN-004 | maxMetaEntrySize is checked against the PAX-overridden entry.size, but the meta buffer accumulates header.size bytes, so the limit can be exceeded | src/parse.ts:241 (check) vs :248 (accumulation) | Yes |
| VULN-005 | ReadEntry applies the global header after the local one, so global values override local ones (the reverse of PAX semantics), and it applies a global linkpath, which Header excludes. Commit af04392 fixed this order in Header only | src/read-entry.ts:105-110, :145 | Yes |
| VULN-003 | When re-packing (c/r/u with @archive, or Pack.add(ReadEntry)), the written header size comes from entry.size while the body length comes from the block count. A mismatch puts extra entries into the output archive | src/write-entry.ts:645, 667-668, 682, 713 | No (needs @archive / re-pack) |
Proof of concept
Each finding has a self-contained test in the attached bundle (exploit_tests/test_vuln_00N_*.cjs). Each test runs a normal archive (control) and a crafted one (attack) against the unmodified 7.5.22 build, and records both outputs in exploit_tests/evidence/. All tests were run on macOS. Behaviour on Linux and Windows wasn't checked, but the affected code is platform-independent.
Impact
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 Maven artifacts (3)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » tarvia npm tar | < 8.0.0 | 8.0.0 |
| org.webjars » tarvia npm tar | < 8.0.0 | 8.0.0 |
| org.webjars.npm » tarvia npm tar | < 8.0.0 | 8.0.0 |
Blast radius
76% of the dependent artifacts (16) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 15 |
| 2 hops | 12 |
| 3 hops | 4 |
| 4 hops | 4 |
| 5 hops | 8 |
| 6 hops | 2 |
Most used dependents
- org.webjars.npm » openlayers4 usages
- org.webjars » bin-build4 usages
- org.webjars » bin-wrapper4 usages
- org.webjars.npm » closure-util2 usages
- org.webjars » download2 usages
- org.mvnpm.at.lwrjs » api1 usages
- org.webjars » imagemin-gifsicle1 usages
- org.webjars » imagemin-jpegtran1 usages
- org.webjars » imagemin-optipng1 usages
- org.webjars » imagemin-pngquant1 usages
- org.webjars.npm » get-down1 usages
- org.webjars » decompress1 usages
- org.webjars » gifsicle1 usages
- org.webjars » jpegtran-bin1 usages
- org.webjars » optipng-bin1 usages
Computed from the dependency graph of build 20261205.0236 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2026-140236 | nvd.nist.gov |
| Package | isaacs/node-tar | github.com |
| Web | isaacs/node-tar advisory GHSA-qv2w-fc3h-pm27 | github.com |
| Web | isaacs/node-tar commit f351e5b | github.com |
| Web | isaacs/node-tar release v8.0.0 | github.com |
