CVE-2026-140240: node-tar: A small archive exhausts memory or CPU through path-reservation bookkeeping
node-tar is a tar archive manipulation library for Node.js. Prior to 8.0.2, a small crafted archive can exhaust memory or CPU through several path bookkeeping paths. Asynchronous PathReservations performs excessive work for unbounded linkpath depth and long path components, retains completed reservation state, and stores long names in the normalizeUnicode cache whose entry-count limit does not bound bytes. Separately, filesFilter memoizes path prefixes when the caller supplies a file list. This issue is fixed in version 8.0.2.
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.2
Event History
Frequently Asked Questions
Which deployments are realistically exposed?
Applications using npm/tar versions before 8.0.2 are affected when they process crafted tar archives. The filesFilter-related path applies when the caller supplies a file list.
What does an attacker need to provide?
An attacker needs a crafted archive designed with unbounded linkpath depth, long path components, or long names. These inputs can drive excessive CPU or memory consumption through path-reservation and Unicode-normalization bookkeeping.
How can I determine whether my application is affected?
Check the installed npm/tar version and whether the application processes tar archives. Versions prior to 8.0.2 are affected; version 8.0.2 contains the fix.