HighVulnerabilityGHSA-8cj5-5rvv-wf4vCVE-2025-48387Published 3 Jun 2025
tar-fs can extract outside the specified dir with a specific tarball
Your version
Affected releases · tar-fs
- 3.x3.0.0 – 3.0.8Fixed in 3.0.9
- 2.x2.0.0 – 2.1.2Fixed in 2.1.3
- 1.x1.0.0 – 1.16.4Fixed in 1.16.5
- 0.5.x and older0.1.0 – 0.5.2No fix, no longer updated
On 3.x, the newest line:
npm install tar-fs@3.0.9Every release on a timeline
3.x
Affected
3.0.0 – 3.0.8
9 releases
Fixed
3.0.9 – 3.1.3
6 releases, latest
2.x
Affected
2.0.0 – 2.1.2
5 releases
Fixed
2.1.3 – 2.1.5
3 releases
1.x
Affected
1.0.0 – 1.16.4
31 releases
Fixed
1.16.5 – 1.16.6
2 releases
0.x
Affected
0.1.0 – 0.5.2
21 releases
What happens
Impact
v3.0.8, v2.1.2, v1.16.4 and below
Patches
Has been patched in 3.0.9, 2.1.3, and 1.16.5
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
Thank you Caleb Brown from Google Open Source Security Team for reporting this in detail.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.