{"answers":{"affected":"1 open source package ship an affected version, including dawidd6/action-download-artifact.","exploited":"There is no known exploitation of GHSA-5xr6-xhww-33m4 in the wild and no public exploit code.","fix":"Upgrade dawidd6/action-download-artifact to 6 or later.","what":"GHSA-5xr6-xhww-33m4 is a vulnerability in dawidd6/action-download-artifact, published on 25 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-5xr6-xhww-33m4 and fix it if it is affected.\n\nWhat it is: GHSA-5xr6-xhww-33m4 is a vulnerability in dawidd6/action-download-artifact, published on 25 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-5xr6-xhww-33m4 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- dawidd6/action-download-artifact (GitHub Actions): affected all versions; fixed in 6\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/GHSA-5xr6-xhww-33m4/ (Markdown: https://insights.sbomify.com/GHSA-5xr6-xhww-33m4/index.md)","id":"GHSA-5xr6-xhww-33m4","markdown":"https://insights.sbomify.com/GHSA-5xr6-xhww-33m4/index.md","name":"GHSA-5xr6-xhww-33m4","record":{"aliases":[],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"GitHub Actions","requires_auth":"none","summary":"Unprivileged attackers can poison build artifacts via forks, leading to code execution in privileged workflows using action-download-artifact.","user_interaction":"not_required","vuln_class":"supply_chain"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Summary\n\nIn versions of `dawidd6/action-download-artifact` before v6, a repository's forks were also searched by default when attempting to find matching artifacts. This could be exploited by an unprivileged attacker to introduce compromised artifacts (such as malicious executables) into a privileged workflow context, as creating a fork requires no privileges.\n\nUsers should immediately upgrade to v6 or newer, which changes the default behavior to avoid searching forks for matching artifacts. Users who cannot upgrade should explicitly set `allow_forks: false` to disable searching forks for artifacts.\n\n### Details\n\nGitHub's artifact storage for workflows does not natively distinguish between artifacts created by a repository and artifacts created by forks of that repository. As a result, attempting to retrieve the \"latest\" artifact for a workflow run can return artifacts produced by a fork, rather than its upstream. \n\nBecause any GitHub user can create a fork of a public repository, this allows for artifact poisoning in the following scenarios (as well as potentially others):\n\n1. Repository `alice/foo` runs `build.yml`, producing `build.exe`\n2. Repository `alice/foo` runs `publish.yml`, which uses `action-download-artifact@v5` to retrieve the latest `build.exe` from `build.yml`\n\nTo compromise `publish.yml` in this scenario, Mallory forks `alice/foo` to `mallory/foo`, and then modifies `build.yml` to produce a compromised `build.exe`. Mallory can then repeatedly trigger their copy of `build.yml` to ensure that their compromised `build.exe` is always the latest artifact, meaning that Alice's `publish.yml` will retrieve it.\n\nAdditional details on this vulnerability can be found in this blog post from 2022:\n\n* https://www.legitsecurity.com/blog/artifact-poisoning-vulnerability-discovered-in-rust\n\n### Impact\n\nThis vulnerability impacts all repositories on GitHub that use `action-download-artifacts@v5` or older and do **not** disable `allow_forks: true`, which is the default.\n\nIf a repository is affected, the severity ranges from downstream contamination (such as publishing attacker-controlled artifacts) to direct workflow compromise (if the retrieved artifact is then executed in a privileged workflow context, such as `push` or `pull_request_target`).","ecosystems":["GitHub Actions"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Artifact poisoning vulnerability in action-download-artifact v5 and earlier","id":"GHSA-5xr6-xhww-33m4","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"GitHub Actions","product":null,"products":[],"type":"supply_chain","year":"2024"},"n_packages":1,"n_references":null,"packages":[{"ecosystem":"GitHub Actions","fixed":["6"],"introduced":["0"],"last_affected":[],"package":"dawidd6/action-download-artifact","purl":null,"source":"GHSA-5xr6-xhww-33m4"}],"products":null,"published":"2024-11-25","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Unprivileged attackers can poison build artifacts via forks, leading to code execution in privileged workflows using action-download-artifact.","url":"https://insights.sbomify.com/GHSA-5xr6-xhww-33m4/"}