CVE-2026-140231: node-tar: Decompression within the ratio limit is buffered in memory without backpressure, and zero-size entries queue without bound
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, decompression within the ratio limit is buffered in memory without backpressure, and zero-size entries queue without bound. A service that extracts or lists untrusted compressed archives can be made to use much more memory than the archive size suggests, without hitting the ratio limit. The affected security path includes maxDecompressionRatio, ReadEntry, src/parse.ts:576-577, 551-555, 343. This issue is fixed in version 8.0.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.0.0
Event History
Frequently Asked Questions
Which applications are realistically exposed to this issue?
Services using node-tar before 8.0.0 to extract or list compressed archives supplied by untrusted parties are exposed. The issue can cause memory use far beyond what the archive size suggests.
Does configuring maxDecompressionRatio prevent exploitation?
No. The affected behavior occurs while decompression remains within the configured ratio limit, so the ratio limit does not prevent the unbounded memory pressure described here.
What archive content is involved in triggering the memory growth?
An attacker can use compressed archive content that is buffered in memory without backpressure and zero-size entries that queue without bound. Exploitation requires the application to process the attacker-controlled archive.
What is the available remediation?
Upgrade node-tar to version 8.0.0, which fixes the issue.