{"id":"CVE-2025-48387","aliases":["CVE-2025-48387","GHSA-8cj5-5rvv-wf4v"],"related":[],"kind":"vulnerability","state":"published","title":"tar-fs has issue where extract can write outside the specified dir with a specific tarball","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n v3.0.8, v2.1.2, v1.16.4 and below\n\n### Patches\nHas been patched in 3.0.9, 2.1.3, and 1.16.5\n\n### Workarounds\nYou can use the ignore option to ignore non files/directories.\n\n```js\n  ignore (_, header) {\n    // pass files & directories, ignore e.g. symlinks\n    return header.type !== 'file' && header.type !== 'directory'\n  }\n```\n\n### Credit\nThank you Caleb Brown from Google Open Source Security Team for reporting this in detail.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-06-02T19:20:18.220Z","modified":"2026-09-10T03:50:24.933Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 1.16.5","status":"affected"},{"version":">= 2.0.0, < 2.1.3","status":"affected"},{"version":">= 3.0.0, < 3.0.9","status":"affected"}],"vendor":"mafintosh","product":"tar-fs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.16.5"}],"ecosystem":"npm","package":"tar-fs","purl":"pkg:npm/tar-fs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.1.3"}],"ecosystem":"npm","package":"tar-fs","purl":"pkg:npm/tar-fs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.0.9"}],"ecosystem":"npm","package":"tar-fs","purl":"pkg:npm/tar-fs","source":"ghsa"}],"references":[{"url":"https://github.com/mafintosh/tar-fs/security/advisories/GHSA-8cj5-5rvv-wf4v","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/google/security-research/security/advisories/GHSA-xrg4-qp5w-2c3w","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mafintosh/tar-fs/commit/647447b572bc135c41035e82ca7b894f02b17f0f","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/06/msg00012.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-48387","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/mafintosh/tar-fs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-06-03T02:03:18.780Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-48387","url":"https://www.cve.org/CVERecord?id=CVE-2025-48387","licence":"CVE Terms of Use","modified":"2025-11-03T20:04:45.253Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8cj5-5rvv-wf4v","url":"https://github.com/advisories/GHSA-8cj5-5rvv-wf4v","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:24.933Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-48387","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-48387","licence":"Public domain","modified":"2026-06-17T09:29:35.470Z"}],"updatedAt":"2026-11-25T22:58:58.669Z","epss":{"score":0.00579,"percentile":0.49027,"date":"2026-12-01T12:00:22.000Z"}}