{"id":"CVE-2024-12905","published":"2025-03-27T16:25:34Z","modified":"2025-11-03T19:29:11Z","title":"An Improper Link Resolution Before File Access (\"Link Following\") and Improper Limitation of a Pathname to a…","vendor":null,"product":null,"tier":"tail","description":{"text":"An Improper Link Resolution Before File Access (\"Link Following\") and Improper Limitation of a Pathname to a Restricted Directory (\"Path Traversal\"). This vulnerability occurs when extracting a maliciously crafted tar file, which can result in unauthorized file writes or overwrites outside the intended extraction directory. The issue is associated with index.js in the tar-fs package.\n\nThis issue affects tar-fs: from 0.0.0 before 1.16.4, from 2.0.0 before 2.1.2, from 3.0.0 before 3.0.8.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02299,"percentile":0.83713,"provenance":"source"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/mafintosh/tar-fs/commit/a1dd7e7c7f4b4a8bd2ab60f513baca573b44e2ed","tags":["patch"]},{"url":"https://www.seal.security/blog/a-link-to-the-past-uncovering-a-new-vulnerability-in-tar-fs","tags":["technical-description"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/06/msg00012.html","tags":[]}],"priority":{"score":27.0,"factors":[{"name":"EPSS percentile","points":16.74},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.25}]},"exploitSources":{"exploitdb":{"count":1,"earliest":"2025-04-22"},"pocGithub":{"count":1,"skipped":0,"earliest":"2025-04-24","earliestUrl":"https://github.com/theMcSam/CVE-2024-12905-PoC","repos":[{"name":"theMcSam/CVE-2024-12905-PoC","url":"https://github.com/theMcSam/CVE-2024-12905-PoC","stars":1,"created":"2025-04-24"}]},"first":{"date":"2025-04-22","source":"Exploit-DB","url":"https://www.exploit-db.com/exploits/52268"},"provenance":"source"},"affectedVersions":[{"vendor":null,"product":null,"versions":[">= 0.0.0, < 1.16.4",">= 2.0.0, < 2.1.2",">= 3.0.0, < 3.0.8"]}],"fixedVersions":[{"vendor":null,"product":null,"versions":["1.16.4","2.1.2","3.0.8"]}],"capec":[{"id":"CAPEC-132","name":"Symlink Attack"},{"id":"CAPEC-126","name":"Path Traversal"}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-03-27T18:21:53.061002Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"tar-fs","vulnerableRanges":["<1.16.4",">=2.0.0, <2.1.2",">=3.0.0, <3.0.7"],"patched":["1.16.4","2.1.2","3.0.7"],"from":["GHSA-pq67-2wwv-3xjx"],"provenance":"source"}],"summary":{"text":"A path traversal and link-following flaw in index.js of the tar-fs package allows files to be written or overwritten outside the intended extraction directory when a maliciously crafted tar archive is extracted. Exploitation requires an attacker to supply the crafted tar file to a system that extracts it, with no authentication or user interaction needed to trigger the extraction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T05:38:01Z"},"euvd":{"id":"EUVD-2024-54315","exploited":false,"provenance":"source"},"exploits":[{"id":52268,"url":"https://www.exploit-db.com/exploits/52268","title":"tar-fs 3.0.0 - Arbitrary File Write/Overwrite","date":"2025-04-22","verified":false,"provenance":"source"}],"lineage":{"familyId":"fam-mafintosh-tar-fs-cve-2024-12905","children":[{"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"]}]},{"from":"CVE-2024-12905","to":"CVE-2025-59343","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["index.js"],"commits":["https://github.com/mafintosh/tar-fs/commit/a1dd7e7c7f4b4a8bd2ab60f513baca573b44e2ed","https://github.com/mafintosh/tar-fs/commit/0bd54cdf06da2b7b5b95cd4b062c9f4e0a8c4e09"],"basis":"shared function","functions":["extract"]}]}],"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"}}