{"answers":{"affected":"2 open source packages ship an affected version, including golang and toolchain.","exploited":"There is no known exploitation of CVE-2024-24787 in the wild and no public exploit code.","fix":"Upgrade golang to a fixed version for your release line: 1.21.10 or 1.22.3.","what":"CVE-2024-24787 is a medium-severity code injection vulnerability in cmd/go, published on 8 May 2024. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-24787 and fix it if it is affected.\n\nWhat it is: CVE-2024-24787 is a medium-severity code injection vulnerability in cmd/go, published on 8 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-24787 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- golang (Bitnami): affected all versions; fixed in 1.21.10, 1.22.3\n- toolchain (Go): affected all versions; fixed in 1.21.10, 1.22.3\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-24787/ (Markdown: https://insights.sbomify.com/CVE-2024-24787/index.md)","id":"CVE-2024-24787","markdown":"https://insights.sbomify.com/CVE-2024-24787/index.md","name":"CVE-2024-24787","record":{"aliases":["AZL-40428","AZL-79058","AZL-98835","BIT-golang-2024-24787","GHSA-5fq7-4mxc-535h","GO-2024-2825","MINI-86x4-7r67-jvfj","MINI-hfhq-5vp3-hp27","MINI-mh8w-354f-q8v2","SUSE-SU-2024:1574-1","SUSE-SU-2024:1588-1","openSUSE-SU-2024:13941-1"],"analysis":{"component_type":"developer_tool","fix_type":"patch","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Go toolchain","requires_auth":"high_privilege","summary":"Attackers can execute arbitrary code during Go module builds on Darwin by exploiting CGO linker flags, affecting developers using the Go toolchain.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Go","cpe":[],"cvss":{"score":6.4,"severity":"medium","source":"cisa-adp","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[],"description":"On Darwin, building a Go module which contains CGO can trigger arbitrary code execution when using the Apple version of ld, due to usage of the -lto_library flag in a \"#cgo LDFLAGS\" directive.","ecosystems":["Bitnami","Go","SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","SUSE:Linux Enterprise Module for Development Tools 15 SP5","SUSE:Linux Enterprise Server 15 SP4-LTSS","SUSE:Linux Enterprise Server for SAP Applications 15 SP4","SUSE:Linux Enterprise Software Development Kit 12 SP5","openSUSE:Leap 15.5","openSUSE:Leap 15.6","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":"2024-05-10","github_poc":1,"max_poc_stars":5,"metasploit":0,"nuclei":0,"refs":[{"date":"2024-05-10T07:45:51Z","kind":"github_poc","ref":"https://github.com/LOURC0D3/CVE-2024-24787-PoC","stars":5,"title":"CVE-2024-24787 Proof of Concept"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Arbitrary code execution during build on Darwin in cmd/go","id":"CVE-2024-24787","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"code_injection","year":"2024"},"n_packages":11,"n_references":6,"next":{"headline":"Malformed DNS message can cause infinite loop in net","id":"CVE-2024-24788"},"packages":[{"ecosystem":"Bitnami","fixed":["1.21.10","1.22.3"],"introduced":["0","1.22.0-0"],"last_affected":[],"package":"golang","purl":"pkg:bitnami/golang","source":"BIT-golang-2024-24787"},{"ecosystem":"Go","fixed":["1.21.10","1.22.3"],"introduced":["0","1.22.0-0"],"last_affected":[],"package":"toolchain","purl":"pkg:golang/toolchain","source":"GO-2024-2825"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","fixed":["1.21.10-150000.1.33.1"],"introduced":["0"],"last_affected":[],"package":"go1.21","purl":"pkg:rpm/suse/go1.21\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-ESPOS","source":"SUSE-SU-2024:1588-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","fixed":["1.21.10-150000.1.33.1"],"introduced":["0"],"last_affected":[],"package":"go1.21","purl":"pkg:rpm/suse/go1.21\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-LTSS","source":"SUSE-SU-2024:1588-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Development Tools 15 SP5","fixed":["1.21.10-150000.1.33.1"],"introduced":["0"],"last_affected":[],"package":"go1.21","purl":"pkg:rpm/suse/go1.21\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP5","source":"SUSE-SU-2024:1588-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP4-LTSS","fixed":["1.21.10-150000.1.33.1"],"introduced":["0"],"last_affected":[],"package":"go1.21","purl":"pkg:rpm/suse/go1.21\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP4-LTSS","source":"SUSE-SU-2024:1588-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP4","fixed":["1.21.10-150000.1.33.1"],"introduced":["0"],"last_affected":[],"package":"go1.21","purl":"pkg:rpm/suse/go1.21\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP4","source":"SUSE-SU-2024:1588-1"},{"ecosystem":"SUSE:Linux Enterprise Software Development Kit 12 SP5","fixed":["1.21.10-1.33.1"],"introduced":["0"],"last_affected":[],"package":"go1.21","purl":"pkg:rpm/suse/go1.21\u0026distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP5","source":"SUSE-SU-2024:1574-1"},{"ecosystem":"openSUSE:Leap 15.5","fixed":["1.21.10-150000.1.33.1"],"introduced":["0"],"last_affected":[],"package":"go1.21","purl":"pkg:rpm/opensuse/go1.21\u0026distro=openSUSE%20Leap%2015.5","source":"SUSE-SU-2024:1588-1"},{"ecosystem":"openSUSE:Leap 15.6","fixed":["1.21.10-150000.1.33.1"],"introduced":["0"],"last_affected":[],"package":"go1.21","purl":"pkg:rpm/opensuse/go1.21\u0026distro=openSUSE%20Leap%2015.6","source":"SUSE-SU-2024:1588-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["1.21.10-1.1"],"introduced":["0"],"last_affected":[],"package":"go1.21","purl":"pkg:rpm/opensuse/go1.21\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:13941-1"}],"prev":{"headline":"Infinite loop in JSON unmarshaling in google.golang.org/protobuf","id":"CVE-2024-24786"},"products":["cmd/go"],"published":"2024-05-08","related":[],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-02-13","vendors":["Go toolchain"]},"summary":"Attackers can execute arbitrary code during Go module builds on Darwin by exploiting CGO linker flags, affecting developers using the Go toolchain.","url":"https://insights.sbomify.com/CVE-2024-24787/"}