NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

CVE-2026-140231 — tar

Fix: isaacs/node-tar@da66090

CVE-2026-140231 is a CWE-409 vulnerability in tar. A fix is available for tar — see the affected versions and patch details below.

node-tar: Decompression within the ratio limit is buffered in memory without backpressure, and zero-size entries queue without bound

Also known asGHSA-9hmx-4f52-v64x
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Dec 2, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-140231.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

8Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
tarnpm
115.4Mdownloads / week

Description

Summary

The GHSA-23hp-3jrh-7fp fix (7.5.19, commit 2812e93) aborts when the total decompressed size exceeds maxDecompressionRatio times the compressed size. That limits total work, not how much is held in memory at once. When reading from a file, each read chunk is inflated synchronously and its output is buffered in a paused ReadEntry, so memory use isn't bounded while staying under the ratio. In the same write, zero-size entries are queued without any limit.

Details

#LocationDefault options
VULN-008src/parse.ts:576-577, 551-555, 343 → src/read-entry.ts:131Yes (x({file}), t({file}))
VULN-011src/parse.ts:268-273 (same root cause)Yes

Proof of concept

exploit_tests/test_vuln_008_* and _011_ measure memory for a control archive and an attack archive against the unmodified 7.5.22 build. Output is in exploit_tests/evidence/. The tests were run on macOS.

Impact

A service that extracts or lists untrusted compressed archives can be made to use much more memory than the archive size suggests, without hitting the ratio limit.

Suggested fix

Queue compressed input and inflate in small slices only while consumers aren't paused, and stop accepting zero-size entries while the queue is non-empty. One patch covering both was validated on a copy of the source (fixes/VULN-008.diff).

Versions: tested on 7.5.22 (main @ 2a22bfc). 7.5.23 changes only the publishing workflow (no src/ changes), so it is affected too.

Reproduction bundle

A bundle with the tests, recorded evidence and proposed fix diffs for this report is ready. This form takes no attachments, so I'll add it to the temporary private fork, or send it however you prefer.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmtarall versions8.0.0npm install tar@8.0.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for tar, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update tar to 8.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-140231 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Frequently Asked Questions

### Summary The GHSA-23hp-3jrh-7fp fix (7.5.19, commit 2812e93) aborts when the total decompressed size exceeds `maxDecompressionRatio` times the compressed size. That limits total work, not how much is held in memory at once. When reading from a file, each read chunk is inflated synchronously and its output is buffered in a paused `ReadEntry`, so memory use isn't bounded while staying under the ratio. In the same write, zero-size entries are queued without any limit. ### Details | # | Location | Default options | |---|---|---| | VULN-008 | `src/parse.ts:576-577, 551-555, 343` → `src/read-e
O3 Security · Impact-Aware SCA

Is CVE-2026-140231 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2026-140231: tar — Fixed in 8.0.0