CVE-2025-59343 — tar-fs
Fix: mafintosh/tar-fs@0bd54cdCVE-2025-59343 is a Path Traversal vulnerability in tar-fs. A fix is available for tar-fs — see the affected versions and patch details below.
tar-fs has a symlink validation bypass if destination directory is predictable with a specific tarball
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2025-59343.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
tar-fsnpmDescription
Impact
v3.1.0, v2.1.3, v1.16.5 and below
Patches
Has been patched in 3.1.1, 2.1.4, and 1.16.6
Workarounds
You can use the ignore option to ignore non files/directories.
ignore (_, header) {
// pass files & directories, ignore e.g. symlinks
return header.type !== 'file' && header.type !== 'directory'
}
Credit
Reported by: Mapta / BugBunny_ai
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | tar-fs | ≥ 3.0.0&&< 3.1.1 | 3.1.1npm install tar-fs@3.1.1 |
| 📦npm | tar-fs | ≥ 2.0.0&&< 2.1.4 | 2.1.4npm install tar-fs@2.1.4 |
| 📦npm | tar-fs | all versions | 1.16.6npm install tar-fs@1.16.6 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for tar-fs, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update tar-fs to 3.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-59343 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for CVE-2025-59343 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Cryostat 4 on RHEL 9 | cryostat/cryostat-agent-init-rhel9:0.5.3-2 | RHSA-2025:17376 |
| Red Hat Ansible Automation Platform 2.5 for RHEL 8 | automation-gateway-0:2.5.20251022-1.el8ap | RHSA-2025:18979 |
| Red Hat Ansible Automation Platform 2.6 for RHEL 9 | automation-platform-ui-0:2.6.2-1.el9ap | RHSA-2025:19201 |
| Multicluster Global Hub 1.6.5 | multicluster-globalhub/multicluster-globalhub-grafana-rhel9:1773650060 | RHSA-2026:6226 |
| Red Hat Ansible Automation Platform 2.6 | ansible-automation-platform-26/gateway-rhel9:2.6 | RHSA-2025:19221 |
| Red Hat Ceph Storage 7.1 | rhceph/rhceph-7-rhel9:1781863705 | RHSA-2026:33154 |
| Red Hat Ceph Storage 9.0 | rhceph/rhceph-9-rhel9:1781160401 | RHSA-2026:26411 |
| Red Hat Developer Hub 1.7 | rhdh/rhdh-hub-rhel9:1.7.2-1761774405 | RHSA-2025:19529 |
Frequently Asked Questions
Is CVE-2025-59343 in your dependencies?
Find it across npm, including transitive dependencies.