CVE-2026-59871 — Vulnerability in tar — CVE Details
node-tar: Process crash via PAX numeric path type confusion
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.64%). Schedule for your next planned update.
Does your project use an affected tar version?
Paste your package-lock.json to check it for CVE-2026-59871 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
A crafted 2.5KB tar archive crashes any Node.js process that extracts it. The PAX header parser coerces all-digit path values to JavaScript numbers, which causes an uncaught TypeError when downstream code calls .split('/') on the numeric value. Error handlers and strict: false cannot intercept the crash.
Details
In pax.ts line 180, parseKV converts PAX values matching /^[0-9]+$/ to numbers via +v. This applies to all fields including path and linkpath. When a PAX header sets path to an all-digit string like "12345", the value becomes the number 12345.
This number flows through Header -> ReadEntry -> Unpack.CHECKPATH, where normalizeWindowsPath(entry.path).split('/') throws a TypeError because numbers don't have .split().
The throw is synchronous during event emission and bypasses all error handling:
strict: falsedoes not help'error'event handlers do not catch it'warn'handlers do not catch it- The TypeError propagates through the event emitter stack as an uncaughtException
Directory, SymbolicLink, and Link type entries reach CHECKPATH and crash. File type entries crash earlier in Header constructor at this.path.slice(-1), but that throw is caught and emitted as a warning only.
PoC
Create a tar archive with a PAX extended header containing an all-digit path:
PAX header body: "18 path=12345\n"
Entry type: Directory (type '5')
Extract it:
const tar = require('tar');
// All of these crash with TypeError: t.split is not a function
tar.extract({ file: 'malicious.tar', cwd: '/tmp/test' });
// Error handlers don't help:
tar.extract({ file: 'malicious.tar', cwd: '/tmp/test', strict: false })
.on('error', (err) => { /* never reached */ })
.on('warn', (code, msg) => { /* never reached */ });
The archive is ~2.5KB. The crash is deterministic on every attempt.
Impact
Denial of service. Any application or tool that extracts untrusted tar archives crashes from a single small file. This includes npm (which uses node-tar to extract packages), CI/CD pipelines, file upload processors, and backup tools. The crash cannot be caught by application-level error handling.
Advisory Timeline
- First published July 20, 2026 (129 days ago).
- Last revised September 10, 2026 — 51 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install tar@7.5.18
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| tar npm · Affected: All versions | 7.5.18 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-704
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
References
- https://github.com/isaacs/node-tar/security/advisories/GHSA-w8wr-v893-vjvpWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-59871ADVISORY
- https://github.com/isaacs/node-tar/commit/e02a4e9e013c4be95302e2eb2047a942b883c27bWEB
- https://github.com/isaacs/node-tarPACKAGE
- https://github.com/isaacs/node-tar/releases/tag/v7.5.18WEB
Frequently Asked Questions
- What is CVE-2026-59871?
- node-tar: Process crash via PAX numeric path type confusion. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
- How do I check if my project is affected by CVE-2026-59871?
- CVE-2026-59871 affects tar. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-59871 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 45.4% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-59873CRITICAL
node-tar: Decompression/parse DoS via unlimited input
- CVE-2026-24842HIGH
node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Traversal
- CVE-2021-32804HIGH
Arbitrary File Creation/Overwrite due to insufficient absolute path sanitization
- CVE-2021-37713HIGH
Arbitrary File Creation/Overwrite on Windows via insufficient relative path sanitization
- CVE-2026-26960HIGH
Arbitrary File Read/Write via Hardlink Target Escape Through Symlink Chain in node-tar Extraction
- CVE-2026-23745HIGH
node-tar is Vulnerable to Arbitrary File Overwrite and Symlink Poisoning via Insufficient Path Sanitization
- CVE-2026-59874HIGH
node-tar: Negative tar entry size causes infinite loop in archive replace
- CVE-2026-31802HIGH
node-tar Symlink Path Traversal via Drive-Relative Linkpath