{"answers":{"affected":"2 open source packages ship an affected version, including @actions/artifact. It affects 2 products.","exploited":"There is no known exploitation of CVE-2024-42471 in the wild and no public exploit code.","fix":"Upgrade @actions/artifact to 2.1.2 or later.","what":"CVE-2024-42471 is a high-severity path traversal vulnerability in actions toolkit, published on 2 Sep 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-42471 and fix it if it is affected.\n\nWhat it is: CVE-2024-42471 is a high-severity path traversal vulnerability in actions toolkit, published on 2 Sep 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2024-42471 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @actions/artifact (npm): affected from 2.0.0; fixed in 2.1.2\n- @actions/artifact (npm): affected from 2.0.0; fixed in 2.1.2\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-42471/ (Markdown: https://insights.sbomify.com/CVE-2024-42471/index.md)","id":"CVE-2024-42471","markdown":"https://insights.sbomify.com/CVE-2024-42471/index.md","name":"CVE-2024-42471","record":{"aliases":["GHSA-6q32-hq47-5qq3"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"GitHub Actions toolkit","requires_auth":"low_privilege","summary":"Attackers can write arbitrary files via path traversal in crafted artifacts, affecting GitHub Actions toolkit users.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"actions\\/artifact","vendor":"github"},{"product":"actions_toolkit","vendor":"github"}],"cvss":{"score":7.3,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"actions/artifact is the GitHub ToolKit for developing GitHub Actions.  Versions of `actions/artifact` on the 2.x branch before 2.1.2 are vulnerable to arbitrary file write when using `downloadArtifactInternal`, `downloadArtifactPublic`, or `streamExtractExternal` for extracting a specifically crafted artifact that contains path traversal filenames. Users are advised to upgrade to version 2.1.2 or higher. There are no known workarounds for this issue.","ecosystems":["npm"],"exploits":{"exploitdb":1,"first_seen":"2025-04-24","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-04-24T15:28:56Z","kind":"github_poc","ref":"https://github.com/theMcSam/CVE-2024-42471-PoC","stars":0,"title":"unzip-stream file write/overwrite vulnerability"},{"date":"2025-04-30","kind":"exploitdb","ref":"52276","stars":null,"title":"unzip-stream 0.3.1 - Arbitrary File Write"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Arbitrary File Write via artifact extraction in actions/artifact","id":"CVE-2024-42471","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":2,"n_references":3,"next":{"headline":"Flatpak may allow access to files outside sandbox for certain apps","id":"CVE-2024-42472"},"packages":[{"ecosystem":"npm","fixed":["2.1.2"],"introduced":["2.0.0"],"last_affected":[],"package":"@actions/artifact","purl":null,"source":"GHSA-6q32-hq47-5qq3"},{"ecosystem":"npm","fixed":["2.1.2"],"introduced":["2.0.0"],"last_affected":[],"package":"@actions/artifact","purl":"pkg:npm/%40actions/artifact","source":"GHSA-6q32-hq47-5qq3"}],"prev":{"headline":"CometVisu Backend for openHAB has a sensitive information disclosure vulnerability","id":"CVE-2024-42470"},"products":["toolkit"],"published":"2024-09-02","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":"US public information, NVD API terms","name":"NVD"},{"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-08-27","vendors":["actions"]},"summary":"Attackers can write arbitrary files via path traversal in crafted artifacts, affecting GitHub Actions toolkit users.","url":"https://insights.sbomify.com/CVE-2024-42471/"}