CVE-2026-140118: node-tar: Uncapped linkpath drives quadratic getDirs in async path reservation causing uncatchable OOM DoS
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.0, on POSIX hosts, asynchronous extraction of an attacker-controlled archive with a deeply nested linkpath causes PathReservations.getDirs() to materialize every ancestor prefix. The quadratic allocation can exhaust the Node.js heap and terminate the process. The reserve() path is not used for this purpose on Windows. 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 deployments are exposed to this denial-of-service condition?
Deployments using node-tar before 8.0.0 on POSIX hosts are affected when they asynchronously extract attacker-controlled archives. The affected reservation path is not used for this purpose on Windows.
What must an attacker provide to trigger the issue?
An attacker needs an archive containing a deeply nested linkpath and must be able to cause the application to extract that archive asynchronously. Processing the linkpath can cause quadratic memory allocation and exhaust the Node.js heap, terminating the process.
What is the remediation?
Upgrade node-tar to version 8.0.0, which fixes the issue.