CVE-2026-140231: CVE-2026-140231: Denial of Service via Unbounded Buffering and Zero-Size Entry Queuing in node-tar
CVE-2026-140231: Denial of Service via Unbounded Buffering and Zero-Size Entry Queuing in node-tar Vulnerability ID: CVE-2026-140231 CVSS Score: 7.1 Published: 2026-12-02 CVE-2026-140231 is a memory exhaustion vulne
CVE-2026-140231: Denial of Service via Unbounded Buffering and Zero-Size Entry Queuing in node-tar
Vulnerability ID: CVE-2026-140231
CVSS Score: 7.1
Published: 2026-12-02
CVE-2026-140231 is a memory exhaustion vulnerability in the node-tar package for Node.js prior to version 8.0.0. Because archive decompression lacks backpressure enforcement and zero-size archive entries queue in memory without upper bounds, an attacker who supplies a crafted compressed archive can force the host application to exhaust available resident memory and terminate via an Out-of-Memory (OOM) condition, bypassing existing decompression ratio checks.
TL;DR
Versions of node-tar prior to 8.0.0 fail to apply stream backpressure during archive decompression and allow unbounded queuing of zero-size entries in memory. Processing a maliciously crafted archive causes rapid heap exhaustion and application termination via an Out-of-Memory crash, even when the archive adheres to the configured maxDecompressionRatio limit.
⚠️ Exploit Status: POC
Technical Details
- CVE ID: CVE-2026-140231 (GHSA-9hmx-4f52-v64x)
- Weakness Class: CWE-770 (Allocation of Resources Without Limits) / CWE-409 (Data Amplification)
- CVSS v4.0 Score: 7.1 High (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)
- EPSS Score: 0.65% (52.37th Percentile)
- Attack Vector: Network (Crafted compressed tar archive with high chunk expansion or zero-size headers)
- Impact: Denial of Service via Uncontrolled V8 Heap Exhaustion (OOM Crash)
- Exploit Status: Proof of Concept (Trivial to reproduce via tarfile generation)
- Patched Version: node-tar 8.0.0
Affected Systems
- node-tar (npm package: tar) < 8.0.0
-
node-tar (tar): < 8.0.0 (Fixed in:
8.0.0)
Code Analysis
Commit: da66090
Primary architectural rewrite introducing pull-based Web Streams decompression, 64 KiB chunk bounding, synchronous maxOutputLength enforcement, and removal of unbounded entry queues.
Commit: 64456aa
Follow-up and v8.0.0 release commit finalizing the pull-based stream processing engine.
Mitigation Strategies
- Upgrade node-tar (tar on npm) to version 8.0.0 or later to adopt pull-based backpressure and 64 KiB bounded chunk decompression.
- Isolate archive parsing and extraction tasks into separate worker processes or ephemeral containers with strict V8 heap limits (--max-old-space-size) so OOM crashes do not terminate the main application server.
- Enforce strict payload size limits on uploaded archives at the edge proxy or API gateway level.
- Implement entry count circuit breakers during archive parsing to abort extraction if the number of headers exceeds expected operational bounds.
Remediation Steps:
- Audit project dependencies using 'npm ls tar' or 'npm audit' to identify direct and transitive installations of tar < 8.0.0.
- Verify that the target runtime environment runs Node.js version 22 or newer, which is required by node-tar 8.0.0.
- Run 'npm install tar@^8.0.0' (or equivalent yarn/pnpm upgrade command) to update the package.
- Refactor application code to remove deprecated single-letter aliases (such as tar.x, tar.t, tar.c) and adapt stream handlers to Web Streams (ReadableStream) and Promise-based APIs.
- Test archive ingestion workflows against multi-entry archives to confirm bounded memory utilization.
References
- NVD Vulnerability Detail: CVE-2026-140231
- CVE.org Record: CVE-2026-140231
- GitHub Security Advisory: GHSA-9hmx-4f52-v64x
- GitHub Commit: Primary Fix in node-tar (da66090c7a44b2140bd4a6343c478a8e411e1aa7)
- GitHub Commit: Release v8.0.0 (64456aa724e64cfc153840698090ec7c80811dcc)
- GitHub Release: node-tar v8.0.0
- GitHub Repository: isaacs/node-tar
- CVEProject cvelistV5 Record: CVE-2026-140231.json
Read the full report for CVE-2026-140231 on our website for more details including interactive diagrams and full exploit analysis.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.