# CVE-2026-73566: npm tar stack overflow in mapHas filter with long paths

Source: https://junglewise.ai/threats/cve-2026-73566-npm-tar-stack-overflow-in-maphas-filter-with-long-paths  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-13. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-73566 · Severity: high · CVSS 7.5 · Published 2026-08-13

npm tar is a utility for reading and writing tar archives, commonly used for extracting package dependencies and processing uploaded files. A crafted tar file with an extremely long file path can trigger an uncontrollable recursive function that crashes the Node.js process, causing denial of service to any application that extracts or lists files with member selection filters applied.

Technologies: [tar (npm)](https://junglewise.ai/threats/technologies/npm-tar). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-73566 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-73566 being exploited in the wild.

**How severe is CVE-2026-73566?** High severity, with a CVSS score of 7.5, published 13 August 2026.

**Which products and versions are affected?** tar (npm) SEMVER:introduced=0,fixed=7.5.21.

**Is there a fix for CVE-2026-73566?** Yes. tar (npm): upgrade to 7.5.21 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-73566 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-73566?** Check whether you run tar (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- tar (npm): upgrade to 7.5.21 or later

  ```sh
  npm install tar@7.5.21
  ```


## Technical details

The vulnerability is an uncontrolled recursion stack-exhaustion flaw in the mapHas helper function used by filesFilter (src/list.ts). When tar.t() or tar.x() is called with a non-empty member-selection list, a filter is installed that recursively walks file paths using path.dirname() with no segment limit. An attacker can craft a tar archive containing a GNU-L or PAX-x long-path header with tens of thousands of "/" segments (up to 1 MiB). The filter invocation occurs inside Parser[CONSUMEHEADER] at src/parse.ts:253, outside the only try/catch block, causing an uncatchable RangeError that terminates the process. A ~188-byte gzip-compressed archive (≈26 KB uncompressed) is sufficient to trigger the crash on both async and streaming consumers.

## Affected products

- npm tar <=7.5.20

## Identifiers

- CVE-2026-73566
- GHSA-r292-9mhp-454m

## Timeline

- 2026-07-24: disclosed
- 2026-07-21: patched: Fixed in version 7.5.21

## References

- [https://github.com/isaacs/node-tar/security/advisories/GHSA-r292-9mhp-454m](https://github.com/isaacs/node-tar/security/advisories/GHSA-r292-9mhp-454m)

## Related threats

- [node-tar denial of service via NUL byte in PAX records](https://junglewise.ai/threats/cve-2026-59875-node-tar-denial-of-service-via-nul-byte-in-pax-records)
- [isaacs node-tar infinite loop in tar.replace](https://junglewise.ai/threats/cve-2026-59874-isaacs-node-tar-infinite-loop-in-tar-replace)
- [isaacs node-tar Denial of Service via Gzip Bomb](https://junglewise.ai/threats/cve-2026-59873-isaacs-node-tar-denial-of-service-via-gzip-bomb)
- [isaacs node-tar denial of service via PAX numeric path type confusion](https://junglewise.ai/threats/cve-2026-59871-isaacs-node-tar-denial-of-service-via-pax-numeric-path-type)
- [isaacs node-tar interpretation conflict in PAX header parsing](https://junglewise.ai/threats/cve-2026-53655-isaacs-node-tar-interpretation-conflict-in-pax-header-parsing)
