CVE-2025-48387
JSON

8.7high

tar-fs has issue where extract can write outside the specified dir with a specific tarball

Severity
8.7high CVSS:4.0 by GitHub_M
Exploit likelihood
0.58% (higher than 49% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8cj5-5rvv-wf4v

Description

tar-fs provides filesystem bindings for tar-stream. Versions prior to 3.0.9, 2.1.3, and 1.16.5 have an issue where an extract can write outside the specified dir with a specific tarball. This has been patched in versions 3.0.9, 2.1.3, and 1.16.5. As a workaround, use the ignore option to ignore non files/directories.

Affected

Product or packageVersionsReported by
mafintosh tar-fs< 1.16.5, >= 2.0.0, < 2.1.3, >= 3.0.0, < 3.0.9CVE List
tar-fs (npm)before 1.16.5, from 2.0.0 before 2.1.3, from 3.0.0 before 3.0.9GitHub Advisory Database

All scores

GitHub_M8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

tar-fs provides filesystem bindings for tar-stream. Versions prior to 3.0.9, 2.1.3, and 1.16.5 have an issue where an extract can write outside the specified dir with a specific tarball. This has been patched in versions 3.0.9, 2.1.3, and 1.16.5. As a workaround, use the ignore option to ignore non files/directories.

GitHub Advisory Database
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.

NVD (es)

tar-fs proporciona enlaces de sistema de archivos para tar-stream. Las versiones anteriores a 3.0.9, 2.1.3 y 1.16.5 presentan un problema que permite que un extracto escriba fuera del directorio especificado con un archivo tar específico. Esto se ha corregido en las versiones 3.0.9, 2.1.3 y 1.16.5. Como workaround, utilice la opción ignorar para ignorar archivos o directorios que no sean archivos.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-48387 changed 2025-11-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-8cj5-5rvv-wf4v changed 2026-09-10CC-BY-4.0
NVDCVE-2025-48387 changed 2026-06-17Public domain