CVE-2026-140231: node-tar Decompression Within The Ratio Limit Vulnerability
HIGHCVE-2026-140231 is a HIGH decompression within the ratio limit vulnerability (CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)) affecting node-tar libraries in the npm ecosystem. The issue involves decompression within the ratio limit is buffered in memory without backpressure, and zero-size entries queue without bound. Remediation is available by upgrading affected packages to version 8.0.0.
CVE-2026-140231 at a Glance
How to Fix CVE-2026-140231
To remediate this vulnerability, upgrade all affected node-tar dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install tar@8.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls tar
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-140231, inspect your project dependencies using npm:
npm ls tar
Analyze the terminal output to locate any version of node-tar in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.0.0), your application is affected.
Note: The npm ls tar command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-409: Improper Handling of Highly Compressed Data (Data Amplification), where the product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output. In node-tar, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-140231 Affected node-tar Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tar
|
npm |
< 8.0.0
|
8.0.0
|
References
Frequently Asked Questions
What is CVE-2026-140231?
Which node-tar versions are affected?
What version fixes CVE-2026-140231?
Is tar affected?
What CWE is associated with CVE-2026-140231?
How can I check npm dependencies for CVE-2026-140231?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9hmx-4f52-v64x",
"modified" : "2026-12-02T18:28:28Z",
"published" : "2026-12-02T18:28:28Z",
"aliases" : [ "CVE-2026-140231" ],
"summary" : "node-tar: Decompression within the ratio limit is buffered in memory without backpressure, and zero-size entries queue without bound",
"details" : "### Summary\n\nThe GHSA-23hp-3jrh-7fp fix (7.5.19, commit 2812e93) aborts when the total decompressed size exceeds `maxDecompressionRatio` times the compressed size. That limits total work, not how much is held in memory at once. When reading from a file, each read chunk is inflated synchronously and its output is buffered in a paused `ReadEntry`, so memory use isn't bounded while staying under the ratio. In the same write, zero-size entries are queued without any limit.\n\n### Details\n\n| # | Location | Default options |\n|---|---|---|\n| VULN-008 | `src/parse.ts:576-577, 551-555, 343` → `src/read-entry.ts:131` | Yes (`x({file})`, `t({file})`) |\n| VULN-011 | `src/parse.ts:268-273` (same root cause) | Yes |\n\n### Proof of concept\n\n`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.\n\n### Impact\n\nA 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.\n\n### Suggested fix\n\nQueue compressed input and inflate in small slices only while consumers aren't paused, and stop accepting zero-size entries while the queue is non-empty. One patch covering both was validated on a copy of the source (`fixes/VULN-008.diff`).\n\n**Versions:** tested on 7.5.22 (main @ 2a22bfc). 7.5.23 changes only the publishing workflow (no `src/` changes), so it is affected too.\n\n### Reproduction bundle\n\nA bundle with the tests, recorded evidence and proposed fix diffs for this report is ready. This form takes no attachments, so I'll add it to the temporary private fork, or send it however you prefer.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "tar"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "8.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/isaacs/node-tar/security/advisories/GHSA-9hmx-4f52-v64x"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-140231"
}, {
"type" : "WEB",
"url" : "https://github.com/isaacs/node-tar/commit/da66090c7a44b2140bd4a6343c478a8e411e1aa7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/isaacs/node-tar"
}, {
"type" : "WEB",
"url" : "https://github.com/isaacs/node-tar/releases/tag/v8.0.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-409", "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-02T18:28:28Z",
"nvd_published_at" : "2026-12-01T17:17:35Z"
}
}