tar-fs
Affected
- introduced
0, fixed1.16.5(semver)
Fixed versions
1.16.5
Fix
- Fixed version
1.16.5npm install [email protected]
Advisory
Also known as: CVE-2025-48387
tar-fs can extract outside the specified dir with a specific tarball
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.
High Basis: The source's own band: HIGH
0, fixed 1.16.5 (semver)1.16.5
1.16.5npm install [email protected]2.0.0, fixed 2.1.3 (semver)2.1.3
2.1.3npm install [email protected]3.0.0, fixed 3.0.9 (semver)3.0.9
3.0.9npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0