# CVE-2026-26960: npm tar arbitrary file read/write via hardlink symlink escape

Source: https://junglewise.ai/threats/cve-2026-26960-npm-tar-arbitrary-file-read-write-via-hardlink-symlink-escape  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-02-18. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-26960 · Severity: low · CVSS 3.1 · Published 2026-02-18

npm tar is a Node.js library used to extract tar archive files. A vulnerability in the default extraction behavior allows an attacker to craft a malicious tar archive that, when extracted, can read or write files outside the intended extraction directory as the user running the extraction process. This could lead to exposure of sensitive files or modification of critical application files.

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

## Quick answers

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

**How severe is CVE-2026-26960?** Low severity, with a CVSS score of 3.1, published 18 February 2026.

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

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

**How is CVE-2026-26960 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-26960?** 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.8 or later

  ```sh
  npm install tar@7.5.8
  ```


## Technical details

The vulnerability is a path traversal flaw (CWE-22) in tar.extract() that leverages a bypass chain combining symlinks and hardlinks. The root cause is that linkpath validation is string-based and does not resolve symlinks on disk before creating hardlinks. An attacker crafts a tar archive with symlinks (a/b/c/up -&gt; ../.., a/b/escape -&gt; c/up/../..) followed by a hardlink (exfil -&gt; a/b/escape/&lt;target&gt;) pointing outside the extraction root. When extracted with default options, the hardlink target is resolved using path.resolve(cwd, entry.linkpath), bypassing the parent directory safety checks that only protect the destination path, not the resolved hardlink target. This allows arbitrary file read/write as the extracting user without requiring elevated privileges, chmod, or the preservePaths option. The patch is available in version 7.5.8 and later.

## Affected products

- npm tar <=7.5.7

## Identifiers

- CVE-2026-26960
- GHSA-83g3-92jg-28cx

## Timeline

- 2026-02-18: disclosed
- 2026-02-16: patched: Version 7.5.8 and later contains the fix

## References

- [https://github.com/isaacs/node-tar/security/advisories/GHSA-83g3-92jg-28cx](https://github.com/isaacs/node-tar/security/advisories/GHSA-83g3-92jg-28cx)

## Related threats

- [npm tar stack overflow in mapHas filter with long paths](https://junglewise.ai/threats/cve-2026-73566-npm-tar-stack-overflow-in-maphas-filter-with-long-paths)
- [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)
