Quick answers
- Is CVE-2026-31802 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-31802 being exploited in the wild.
- How severe is CVE-2026-31802?
- Medium severity, with a CVSS score of 4, published 10 March 2026.
- Which products and versions are affected?
- tar (npm) SEMVER:introduced=0,fixed=7.5.11.
- Is there a fix for CVE-2026-31802?
- Yes. tar (npm): upgrade to 7.5.11 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-31802 attacked?
- It is attacked with local access, in a software library.
- Am I affected by CVE-2026-31802?
- 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.11 or later
npm install tar@7.5.11
Technical details
This is a symlink path traversal vulnerability in the tar extraction logic. The vulnerable code in Unpack[STRIPABSOLUTEPATH] validates path traversal attempts (..) against a resolved path that still contains the original drive-relative value (e.g., "C:../../../target.txt"), but after validation rewrites the path to the stripped form ("../../../target.txt"). When the symlink is created, it uses the rewritten relative path, which when evaluated from within a nested directory structure (e.g., "a/b/l"), successfully escapes the extraction root. The attack is reachable during normal tar.x({ cwd, file }) extraction of attacker-controlled archives and requires no authentication or special privileges. Patch version 7.5.11 addresses the issue.
Affected products
- npm tar <= 7.5.10
Identifiers
- CVE-2026-31802
- GHSA-9ppj-qmqm-q256
Timeline
- 2026-03-09: disclosed
- 2026-03-09: patched: Version 7.5.11 released