{"answers":{"affected":"6 open source packages ship an affected version, including go.woodpecker-ci.org/woodpecker and go.woodpecker-ci.org/woodpecker/v2. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-41122 in the wild and no public exploit code.","fix":"Upgrade go.woodpecker-ci.org/woodpecker to 2.7.0 or later.","what":"CVE-2024-41122 is a high-severity code injection vulnerability in woodpecker-ci woodpecker, published on 19 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-41122 and fix it if it is affected.\n\nWhat it is: CVE-2024-41122 is a high-severity code injection vulnerability in woodpecker-ci woodpecker, published on 19 Jul 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-41122 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- go.woodpecker-ci.org/woodpecker (Go): affected all versions; no fix listed\n- go.woodpecker-ci.org/woodpecker (Go): affected all versions; fixed in 2.7.0\n- go.woodpecker-ci.org/woodpecker (Go): affected all versions; fixed in 2.7.0\n- go.woodpecker-ci.org/woodpecker/v2 (Go): affected all versions; fixed in 2.7.0\n- go.woodpecker-ci.org/woodpecker/v2 (Go): affected all versions; fixed in 2.7.0\n- go.woodpecker-ci.org/woodpecker/v2 (Go): affected all versions; fixed in 2.7.0\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-41122/ (Markdown: https://insights.sbomify.com/CVE-2024-41122/index.md)","id":"CVE-2024-41122","markdown":"https://insights.sbomify.com/CVE-2024-41122/index.md","name":"CVE-2024-41122","record":{"aliases":["GHSA-3wf2-2pq4-4rvc","GO-2024-2998"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"CI/CD engine","requires_auth":"low_privilege","summary":"Attackers can inject malicious environment variables to alter plugin execution, leading to host takeover or secret extraction in Woodpecker CI/CD.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"woodpecker","vendor":"woodpecker-ci"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"description":"Woodpecker is a simple yet powerful CI/CD engine with great extensibility. The server allow to create any user who can trigger a pipeline run malicious workflows: 1. Those workflows can either lead to a host takeover that runs the agent executing the workflow. 2. Or allow to extract the secrets who would be normally provided to the plugins who's entrypoint are overwritten. This issue has been addressed in release version 2.7.0. Users are advised to upgrade. There are no known workarounds for this vulnerability.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Custom environment variables allow to alter execution flow of plugins in Woodpecker","id":"CVE-2024-41122","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"code_injection","year":"2024"},"n_packages":6,"n_references":5,"next":{"headline":"REXML DoS vulnerability","id":"CVE-2024-41123"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"go.woodpecker-ci.org/woodpecker","purl":"pkg:golang/go.woodpecker-ci.org/woodpecker","source":"GO-2024-2998"},{"ecosystem":"Go","fixed":["2.7.0"],"introduced":["0"],"last_affected":[],"package":"go.woodpecker-ci.org/woodpecker","purl":null,"source":"GHSA-3wf2-2pq4-4rvc"},{"ecosystem":"Go","fixed":["2.7.0"],"introduced":["0"],"last_affected":[],"package":"go.woodpecker-ci.org/woodpecker","purl":"pkg:golang/go.woodpecker-ci.org/woodpecker","source":"GHSA-3wf2-2pq4-4rvc"},{"ecosystem":"Go","fixed":["2.7.0"],"introduced":["0"],"last_affected":[],"package":"go.woodpecker-ci.org/woodpecker/v2","purl":null,"source":"GHSA-3wf2-2pq4-4rvc"},{"ecosystem":"Go","fixed":["2.7.0"],"introduced":["0"],"last_affected":[],"package":"go.woodpecker-ci.org/woodpecker/v2","purl":"pkg:golang/go.woodpecker-ci.org/woodpecker/v2","source":"GHSA-3wf2-2pq4-4rvc"},{"ecosystem":"Go","fixed":["2.7.0"],"introduced":["0"],"last_affected":[],"package":"go.woodpecker-ci.org/woodpecker/v2","purl":"pkg:golang/go.woodpecker-ci.org/woodpecker/v2","source":"GO-2024-2998"}],"prev":{"headline":"Custom workspace allow to overwrite plugin entrypoint executable in Woodpecker","id":"CVE-2024-41121"},"products":["woodpecker"],"published":"2024-07-19","related":[{"cvss_score":8.8,"headline":"Custom workspace allow to overwrite plugin entrypoint executable in Woodpecker","id":"CVE-2024-41121","kev_date_added":null,"published":"2024-07-19"},{"cvss_score":8.1,"headline":"Repositoty takeover in woodpecker-ci","id":"CVE-2023-40034","kev_date_added":null,"published":"2023-08-16"},{"cvss_score":6.1,"headline":"Woodpecker allows cross-site scripting (XSS) via build logs","id":"CVE-2022-29947","kev_date_added":null,"published":"2022-04-29"}],"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":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"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)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["woodpecker-ci"]},"summary":"Attackers can inject malicious environment variables to alter plugin execution, leading to host takeover or secret extraction in Woodpecker CI/CD.","url":"https://insights.sbomify.com/CVE-2024-41122/"}