CVE-2026-140241: node-tar crashes the process with an uncaught exception on a 4-byte zstd magic header when the Node runtime lacks native zstd
node-tar is a tar archive manipulation library for Node.js. From 7.5.22 until 8.0.0, node-tar fails to handle an exception when automatically detecting Zstandard (zstd) compression on Node.js runtimes without native zstd support. An attacker who can supply a specially crafted input file to the asynchronous file listing or extraction API can cause an uncaught exception that terminates the process, resulting in denial of service. This issue is fixed in version 8.0.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.0.0
Event History
Frequently Asked Questions
Which deployments are exposed to this denial-of-service issue?
Deployments using node-tar versions from 7.5.22 up to, but not including, 8.0.0 are affected when they run on a Node.js runtime without native zstd support and process attacker-supplied archives through the asynchronous file listing or extraction API.
What must an attacker be able to do to trigger the crash?
An attacker needs to supply a specially crafted input file containing a 4-byte zstd magic header to an affected asynchronous listing or extraction operation. Successful triggering causes an uncaught exception that terminates the Node.js process.
What is the available remediation?
Upgrade node-tar to version 8.0.0, which fixes the exception handling issue.