CVE-2026-140232: node-tar: Uncaught Exception DoS in tar Extraction via NUL Bytes Surviving Line-Terminator-Blind String Sanitization
node-tar is a tar archive manipulation library for Node.js. From 7.5.17 until 8.0.0, during asynchronous extraction, string sanitization removes content after a NUL byte only within the same line. A line terminator followed by a later NUL byte can therefore leave that NUL in a pathname passed to an asynchronous filesystem operation, causing an uncaught exception and process termination. Listing and synchronous extraction do not expose this process-crash behavior. This issue is fixed in version 8.0.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/node-tarto a version that resolves this vulnerability.Fixed in 8.0.0
Event History
Frequently Asked Questions
Which applications are exposed to process termination?
Applications using node-tar asynchronous extraction are exposed when they process a crafted archive. Archive listing and synchronous extraction do not expose the described process-crash behavior.
What must an attacker control to trigger the issue?
The attacker needs to supply a tar archive containing a pathname with a line terminator followed later by a NUL byte. This can leave the NUL byte in a pathname sent to an asynchronous filesystem operation, causing an uncaught exception.
Are default deployments affected?
The issue depends on use of asynchronous extraction rather than a stated default configuration. Deployments that only list archives or use synchronous extraction are not affected by this specific process-crash behavior.
What should teams do if they cannot immediately upgrade?
Avoid asynchronous extraction of untrusted tar archives until an upgrade is possible. Using archive listing or synchronous extraction avoids the described crash behavior.
How can teams determine whether they are affected?
Check whether the application uses node-tar versions from 7.5.17 up to, but not including, 8.0.0 and performs asynchronous extraction. Version 8.0.0 fixes the issue.