Advisory

GHSA-8cj5-5rvv-wf4v

Also known as: CVE-2025-48387

Summary

tar-fs can extract outside the specified dir with a specific tarball

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2025-06-03 06:14 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

tar-fs

npm · All systems

Affected

  • introduced 0, fixed 1.16.5 (semver)

Fixed versions

1.16.5

Fix

tar-fs

npm · All systems

Affected

  • introduced 2.0.0, fixed 2.1.3 (semver)

Fixed versions

2.1.3

Fix

tar-fs

npm · All systems

Affected

  • introduced 3.0.0, fixed 3.0.9 (semver)

Fixed versions

3.0.9

Fix

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

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences