{"answers":{"affected":"6 open source packages ship an affected version, including tar-fs.","exploited":"There is no known exploitation of CVE-2024-12905 in the wild and no public exploit code.","fix":"Upgrade tar-fs to a fixed version for your release line: 1.16.4, 2.1.2 or 3.0.7.","what":"CVE-2024-12905 is a high-severity path traversal vulnerability in tar-fs, published on 27 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-12905 and fix it if it is affected.\n\nWhat it is: CVE-2024-12905 is a high-severity path traversal vulnerability in tar-fs, published on 27 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-12905 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- tar-fs (npm): affected all versions; fixed in 1.16.4\n- tar-fs (npm): affected all versions; fixed in 1.16.4\n- tar-fs (npm): affected from 2.0.0; fixed in 2.1.2\n- tar-fs (npm): affected from 2.0.0; fixed in 2.1.2\n- tar-fs (npm): affected from 3.0.0; fixed in 3.0.7\n- tar-fs (npm): affected from 3.0.0; fixed in 3.0.7\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-12905/ (Markdown: https://insights.sbomify.com/CVE-2024-12905/index.md)","id":"CVE-2024-12905","markdown":"https://insights.sbomify.com/CVE-2024-12905/index.md","name":"CVE-2024-12905","record":{"aliases":["AZL-59367","DEBIAN-CVE-2024-12905","ECHO-01fc-195c-4504","GHSA-pq67-2wwv-3xjx","MINI-mgrc-433g-jf2q","MINI-vr9x-j54j-rvwp","ROOT-APP-NPM-CVE-2024-12905","UBUNTU-CVE-2024-12905"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js tar library","requires_auth":"none","summary":"Attackers can write or overwrite files outside the intended directory by crafting a malicious tar archive processed by the tar-fs library.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"seal","cpe":[],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"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.","ecosystems":["npm"],"exploits":{"exploitdb":1,"first_seen":"2025-04-22","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-04-24T15:34:41Z","kind":"github_poc","ref":"https://github.com/theMcSam/CVE-2024-12905-PoC","stars":1,"title":"tar-fs file write/overwrite vulnerability"},{"date":"2025-04-22","kind":"exploitdb","ref":"52268","stars":null,"title":"tar-fs 3.0.0 - Arbitrary File Write/Overwrite"}],"tier":"poc_unverified"},"has_fix":true,"headline":"tar-fs Vulnerable to Link Following and Path Traversal via Extracting a Crafted tar File","id":"CVE-2024-12905","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":6,"n_references":2,"next":{"headline":"XSS in Kentico 7","id":"CVE-2024-12907"},"packages":[{"ecosystem":"npm","fixed":["1.16.4"],"introduced":["0"],"last_affected":[],"package":"tar-fs","purl":null,"source":"GHSA-pq67-2wwv-3xjx"},{"ecosystem":"npm","fixed":["1.16.4"],"introduced":["0"],"last_affected":[],"package":"tar-fs","purl":"pkg:npm/tar-fs","source":"GHSA-pq67-2wwv-3xjx"},{"ecosystem":"npm","fixed":["2.1.2"],"introduced":["2.0.0"],"last_affected":[],"package":"tar-fs","purl":null,"source":"GHSA-pq67-2wwv-3xjx"},{"ecosystem":"npm","fixed":["2.1.2"],"introduced":["2.0.0"],"last_affected":[],"package":"tar-fs","purl":"pkg:npm/tar-fs","source":"GHSA-pq67-2wwv-3xjx"},{"ecosystem":"npm","fixed":["3.0.7"],"introduced":["3.0.0"],"last_affected":[],"package":"tar-fs","purl":null,"source":"GHSA-pq67-2wwv-3xjx"},{"ecosystem":"npm","fixed":["3.0.7"],"introduced":["3.0.0"],"last_affected":[],"package":"tar-fs","purl":"pkg:npm/tar-fs","source":"GHSA-pq67-2wwv-3xjx"}],"prev":{"headline":"This CVE ID has been rejected or withdrawn by its CVE Numbering Authority.","id":"CVE-2024-12904"},"products":[],"published":"2025-03-27","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-03","vendors":[]},"summary":"Attackers can write or overwrite files outside the intended directory by crafting a malicious tar archive processed by the tar-fs library.","url":"https://insights.sbomify.com/CVE-2024-12905/"}