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-23314602
  • published2 Dec 2026
  • disclosed1 Dec 2026
  • creditmanus-use, Daniel Coles

Introduced: 1 Dec 2026

NewCVE-2026-140119  (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 PathReservations.getDirs helper in src/path-reservations.ts, which rebuilds a growing path prefix once per segment at O(N^2) time and memory cost. When the asynchronous Unpack extractor processes a symlink or hardlink entry, it pushes entry.linkpath into reserve(), which maps it through getDirs with no depth bound - the existing maxDepth guard is applied only to entry.path, never to entry.linkpath. An attacker who supplies an archive containing a single symlink entry with a deeply nested relative linkpath (e.g. a/a/.../a) causes the quadratic heap growth to exhaust the V8 heap and abort the Node.js process with an uncatchable fatal out-of-memory error (exit code 134).

Note: This is only exploitable on non-Windows hosts using the default asynchronous extraction API (tar.extract / Unpack); synchronous extraction (sync: true) and the Windows reservation path are not affected.

CVSS Base Scores

version 4.0
version 3.1