🛡️ CVE-2026-59871 — tar
Description
node-tar: Process crash via PAX numeric path type confusion
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:
```js
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.
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability low.
Affected software
CVE-2026-59871 is recorded against 1 package.
- tar
Timeline and source
Published on 20 July 2026 and last revised on 21 July 2026. A public exploit is known to exist, which raises the urgency of patching considerably. A vendor advisory or fix has been published. Record sourced from OSV.
References
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)
github.com (Web)
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| tar | — | — |
References
Similar Threats
- Unknown AZL-79553
- Unknown AZL-79556
- Unknown ALSA-2026:0002
- Unknown ALSA-2026:0067
- Unknown BELL-CVE-2025-45582
More CVE 2026 advisories
Browse all of CVE 2026 in the advisory index.
Exploit Protection
Are you running tar?
CVE-2026-59871 carries CVSS 5.3 Medium rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.
Check My Site For CVE-2026-59871 →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.