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-23314605
  • published2 Dec 2026
  • disclosed1 Dec 2026
  • creditAksith Senthuran

Introduced: 1 Dec 2026

NewCVE-2026-140230  (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 PathReservations.getDirs() in src/path-reservations.ts, which materializes every parent-directory prefix of a given path as individual strings, an O(N²) operation. The existing maxDepth guard applies only to entry.path and not to entry.linkpath, so an archive with a shallow entry.path and a deeply nested entry.linkpath bypasses the guard entirely. Processing such an archive forces a catastrophic heap allocation that exhausts the V8 heap, aborting the process with a fatal out-of-memory error that no JavaScript error handler can intercept.

CVSS Base Scores

version 4.0
version 3.1