Improper Handling of Highly Compressed Data (Data Amplification) 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 IDSNYK-JS-TAR-23314599
  • published2 Dec 2026
  • disclosed1 Dec 2026
  • creditw116tjb

Introduced: 1 Dec 2026

NewCVE-2026-140231  (opens in a new tab)
CWE-409  (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 Improper Handling of Highly Compressed Data (Data Amplification) via decompression without backpressure in src/parse.ts (locations 576-577, 551-555, 343) and unbounded queuing of zero-size entries. When reading from a compressed archive, each input chunk is inflated synchronously and its output is buffered in a paused ReadEntry without any backpressure, so memory consumption is not bounded as long as the total decompressed size stays within the maxDecompressionRatio limit. In the same write path, zero-size entries are queued without limit, compounding the unbounded memory growth. A service that extracts or lists untrusted compressed archives can be forced to consume far more memory than the archive's compressed size implies.

PoC

`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.

Note: Tests were run on macOS against the unmodified 7.5.22 build.

CVSS Base Scores

version 4.0
version 3.1