Allocation of Resources Without Limits or Throttling Affecting tar package, versions <8.0.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Allocation of Resources Without Limits or Throttling vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-TAR-23314608
  • published2 Dec 2026
  • disclosed1 Dec 2026
  • creditUnknown

Introduced: 1 Dec 2026

NewCVE-2026-140229  (opens in a new tab)
CWE-770  (opens in a new tab)

How to fix?

Upgrade tar to version 8.0.0 or higher.

Overview

tar is a full-featured Tar for Node.js.

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the CHECKDECOMPRESSIONRATIO guard in src/parse.ts, which evaluates the decompression ratio only after node zlib has already materialized the full inflated output in memory. Because compressed bytes are credited per write() call rather than per codec output chunk, a single large write front-loads the entire inputSize × 1000 budget before the ratio is checked even once, allowing the inflated data to reside in memory unconstrained. An attacker can supply a 65,608-byte zstd archive that expands to 2 GiB, causing an OOM kill at default settings with no option overrides required. A second path exists where data written after the tar end-of-archive marker is buffered indefinitely because SAW_EOF stops the parse loop from draining but does not prevent BUFFERCONCAT from appending, giving a piping producer no back-pressure signal.

CVSS Base Scores

version 4.0
version 3.1