{"answers":{"affected":"2 open source packages ship an affected version, including golang and toolchain.","exploited":"There is no known exploitation of CVE-2023-24531 in the wild and no public exploit code.","fix":"Upgrade golang to 1.21.0-0 or later.","what":"CVE-2023-24531 is a critical command injection vulnerability in cmd/go, published on 2 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-24531 and fix it if it is affected.\n\nWhat it is: CVE-2023-24531 is a critical command injection vulnerability in cmd/go, published on 2 Jul 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 CVE-2023-24531 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- golang (Bitnami): affected all versions; fixed in 1.21.0-0\n- toolchain (Go): affected all versions; fixed in 1.21.0-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-2023-24531/ (Markdown: https://insights.sbomify.com/CVE-2023-24531/index.md)","id":"CVE-2023-24531","markdown":"https://insights.sbomify.com/CVE-2023-24531/index.md","name":"CVE-2023-24531","record":{"aliases":["AZL-43104","AZL-43110","AZL-52719","AZL-79036","AZL-98667","BIT-golang-2023-24531","DEBIAN-CVE-2023-24531","GHSA-cwpg-qgc6-jxvq","GO-2024-2962","MINI-4rh6-5r9f-2c5j","MINI-6xq3-43qf-g7hx","MINI-c2f6-m975-c9wr","UBUNTU-CVE-2023-24531"],"analysis":{"component_type":"developer_tool","fix_type":"patch","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Go toolchain","requires_auth":"none","summary":"The Go toolchain's 'go env' command fails to sanitize output, allowing arbitrary command execution if the output is executed as a shell script.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Go","cpe":[],"cvss":{"score":9.8,"severity":"critical","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[],"description":"Command go env is documented as outputting a shell script containing the Go environment. However, go env doesn't sanitize values, so executing its output as a shell script can cause various bad bahaviors, including executing arbitrary commands or inserting new environment variables. This issue is relatively minor because, in general, if an attacker can set arbitrary environment variables on a system, they have better attack vectors than making \"go env\" print them out.","ecosystems":["Bitnami","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":"Output of \"go env\" does not sanitize values in cmd/go","id":"CVE-2023-24531","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"command_injection","year":"2023"},"n_packages":2,"n_references":5,"next":{"headline":"Incorrect calculation on P256 curves in crypto/internal/nistec","id":"CVE-2023-24532"},"packages":[{"ecosystem":"Bitnami","fixed":["1.21.0-0"],"introduced":["0"],"last_affected":[],"package":"golang","purl":"pkg:bitnami/golang","source":"BIT-golang-2023-24531"},{"ecosystem":"Go","fixed":["1.21.0-0"],"introduced":["0"],"last_affected":[],"package":"toolchain","purl":"pkg:golang/toolchain","source":"GO-2024-2962"}],"prev":{"headline":"File upload in BusinessObjects Business Intelligence Platform (CMC)","id":"CVE-2023-24530"},"products":["cmd/go"],"published":"2024-07-02","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":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-03-28","vendors":["Go toolchain"]},"summary":"The Go toolchain's 'go env' command fails to sanitize output, allowing arbitrary command execution if the output is executed as a shell script.","url":"https://insights.sbomify.com/CVE-2023-24531/"}