{"id":"CVE-2025-48387","published":"2025-06-02T19:20:18Z","modified":"2025-11-03T20:04:45Z","title":"tar-fs has issue where extract can write outside the specified dir with a specific tarball","vendor":"mafintosh","product":"tar-fs","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.7,"severity":"HIGH","version":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00579,"percentile":0.4857,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/mafintosh/tar-fs/security/advisories/GHSA-8cj5-5rvv-wf4v","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/google/security-research/security/advisories/GHSA-xrg4-qp5w-2c3w","tags":["x_refsource_MISC"]},{"url":"https://github.com/mafintosh/tar-fs/commit/647447b572bc135c41035e82ca7b894f02b17f0f","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/06/msg00012.html","tags":[]}],"priority":{"score":15.8,"factors":[{"name":"EPSS percentile","points":9.71},{"name":"CVSS severity","points":6.09}]},"vendorSlug":"mafintosh","affectedVersions":[{"vendor":"mafintosh","product":"tar-fs","versions":["< 1.16.5",">= 2.0.0, < 2.1.3",">= 3.0.0, < 3.0.9"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-06-03T02:03:18.780964Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"tar-fs","vulnerableRanges":["<1.16.5",">=2.0.0, <2.1.3",">=3.0.0, <3.0.9"],"patched":["1.16.5","2.1.3","3.0.9"],"from":["GHSA-8cj5-5rvv-wf4v"],"provenance":"source"}],"summary":{"text":"The tar-fs package from mafintosh, a filesystem binding for tar-stream, contains a path traversal flaw in its extract function that lets a crafted tarball write files outside the target directory. An attacker who can supply a specific tarball for extraction can do this over the network with no privileges and no user interaction, and the default configuration is affected, with the ignore option available as a workaround that skips non-file and non-directory entries.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:24:20Z"},"euvd":{"id":"EUVD-2025-16687","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-mafintosh-tar-fs-cve-2024-12905","parents":[{"from":"CVE-2024-12905","to":"CVE-2025-48387","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:tar-fs","fromFixed":"1.16.4","toFixed":"1.16.5","daysApart":67},{"kind":"version-step","provenance":"source","package":"npm:tar-fs","fromFixed":"2.1.2","toFixed":"2.1.3","daysApart":67},{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/mafintosh/tar-fs/commit/a1dd7e7c7f4b4a8bd2ab60f513baca573b44e2ed","https://github.com/mafintosh/tar-fs/commit/647447b572bc135c41035e82ca7b894f02b17f0f"],"basis":"shared function","functions":["extract"]}]}],"children":[{"from":"CVE-2025-48387","to":"CVE-2025-59343","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:tar-fs","fromFixed":"1.16.5","toFixed":"1.16.6","daysApart":114},{"kind":"version-step","provenance":"source","package":"npm:tar-fs","fromFixed":"2.1.3","toFixed":"2.1.4","daysApart":114},{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/mafintosh/tar-fs/commit/647447b572bc135c41035e82ca7b894f02b17f0f","https://github.com/mafintosh/tar-fs/commit/0bd54cdf06da2b7b5b95cd4b062c9f4e0a8c4e09"],"basis":"shared function","functions":["extract"]},{"kind":"similar","provenance":"machine","score":0.77,"basis":"same product + CWE + description similarity"}]}],"packageHistory":[{"cve":"CVE-2018-20835","published":"2019-04-30","fixed":"1.16.2","kev":false},{"cve":"CVE-2024-12905","published":"2025-03-27","fixed":"3.0.7","kev":false},{"cve":"CVE-2025-48387","published":"2025-06-02","fixed":"3.0.9","kev":false},{"cve":"CVE-2025-59343","published":"2025-09-24","fixed":"3.1.1","kev":false}],"package":"npm:tar-fs"}}