CVE-2026-140229 — Tar — CWE-770
### Summary The `maxDecompressionRatio` guard `tar` added for GHSA-23hp-3jrh-7fpw is evaluated *after* node zlib has already materialized the inflated output, so it observes an allocation rather than bounding one. A remote, unauthenticated party who can hand `tar.t()`/`tar.x()` an archive can deny service with 65,608 bytes, at stock settings. ### Details The check runs from the decompressor's `'data'` event, which fires once per call to node zlib's *synchronous* `_processChunk` — by then that input chunk's entire inflated output is resident: ```ts // src/parse.ts:550-555 this[UNZIP].on('data', chunk => { if (this[CHECKDECOMPRESSIONRATIO](chunk)) { this[CONSUMECHUNK](chunk) } }) ``` Compressed bytes are credited per `write()`, so the guard's resolution is the *caller's write size*, not the codec's output: a single large write front-loads the whole `inputSize × 1000` budget before the ratio is evaluated even once, and `tar`'s own file-reading helpers write up to 16 MB at a time. The decompressors are built with no `maxOutputLength`, so nothing else caps that chunk. The single ratio constant of 1000 was calibrated to DEFLATE's ~1032:1 ceiling. zstd reaches ~32,700:1 and brotli ~1,230,000:1, so on those codecs the expansion completes inside one chunk whatever the write size. zstd requires no caller opt-in — it is auto-sniffed by 4-byte magic whenever `this.zstd !== false`, the default. A third path needs no decompression. Both parse loops stop at the tar EOF m
### Summary The `maxDecompressionRatio` guard `tar` added for GHSA-23hp-3jrh-7fpw is evaluated *after* node zlib has already materialized the inflated output, so it observes an allocation rather than bounding one. A remote, unauthenticated party who can hand `tar.t()`/`tar.x()` an archive can deny service with 65,608 bytes, at stock settings. ### Details The check runs from the decompressor's `'data'` event, which fires once per call to node zlib's *synchronous* `_processChunk` — by then that input chunk's entire inflated output is resident: ```ts // src/parse.ts:550-555 this[UNZIP].on('data', chunk => { if (this[CHECKDECOMPRESSIONRATIO](chunk)) { this[CONSUMECHUNK](chunk) } }) ``` Compressed bytes are credited per `write()`, so the guard's resolution is the *caller's write size*, not the codec's output: a single large write front-loads the whole `inputSize × 1000` budget before the ratio is evaluated even once, and `tar`'s own file-reading helpers write up to 16 MB at a time. The decompressors are built with no `maxOutputLength`, so nothing else caps that chunk. The single ratio constant of 1000 was calibrated to DEFLATE's ~1032:1 ceiling. zstd reaches ~32,700:1 and brotli ~1,230,000:1, so on those codecs the expansion completes inside one chunk whatever the write size. zstd requires no caller opt-in — it is auto-sniffed by 4-byte magic whenever `this.zstd !== false`, the default. A third path needs no decompression. Both parse loops stop at the tar EOF m
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-140229
CVSS 7.1/10 · HIGH · 01.12.2026
CWE: CWE-770
Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Summary: ### Summary
The maxDecompressionRatio guard tar added for GHSA-23hp-3jrh-7fpw is evaluated after node zlib has already materialized the inflated output, so it observes an allocation rather than bounding one. A remote, unauthenticated party who can hand tar.t()/tar.x() an archive can deny service with 65,608 bytes, at stock settings. ### Details
The check runs from the decompressor's…
Affected: tar
⚡ ATTACK VECTOR
Network / Remote (AV:N) · no authentication required (PR:N) · user interaction required (UI:R) · low attack complexity (AC:L).
🌍 REAL WORLD IMPACT
Partial confidentiality disclosure (C:L); service can be completely taken down.
🛡️ REMEDIATION
→ Apply vendor security update for tar.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
⚠️ This week (7 days) — High risk, anonymous remote.
────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]