{"answers":{"affected":"2 open source packages ship an affected version, including golang and stdlib.","exploited":"There is no known exploitation of CVE-2024-24785 in the wild and no public exploit code.","fix":"Upgrade golang to a fixed version for your release line: 1.21.8 or 1.22.1.","what":"CVE-2024-24785 is a medium-severity cross-site scripting vulnerability in Go standard library html/template, published on 5 Mar 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-24785 and fix it if it is affected.\n\nWhat it is: CVE-2024-24785 is a medium-severity cross-site scripting vulnerability in Go standard library html/template, published on 5 Mar 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-24785 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- golang (Bitnami): affected all versions; fixed in 1.21.8, 1.22.1\n- stdlib (Go): affected all versions; fixed in 1.21.8, 1.22.1\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-24785/ (Markdown: https://insights.sbomify.com/CVE-2024-24785/index.md)","id":"CVE-2024-24785","markdown":"https://insights.sbomify.com/CVE-2024-24785/index.md","name":"CVE-2024-24785","record":{"aliases":["AZL-37457","AZL-37460","AZL-79024","AZL-98967","BELL-CVE-2024-24785","BIT-golang-2024-24785","DEBIAN-CVE-2024-24785","GHSA-j6m3-gc37-6r6q","GO-2024-2610","MINI-346h-pr3q-2fcw","MINI-785v-r5hc-wgpw","MINI-cjc2-34qc-q45w","OESA-2025-1072","UBUNTU-CVE-2024-24785"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Go html/template library","requires_auth":"low_privilege","summary":"Attackers can inject unexpected content into templates by exploiting errors from JSON marshaling, bypassing auto-escaping in Go's html/template package.","user_interaction":"not_required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Go","cpe":[],"cvss":{"score":5.4,"severity":"medium","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","version":"3.1"},"cwes":[],"description":"If errors returned from MarshalJSON methods contain user controlled data, they may be used to break the contextual auto-escaping behavior of the html/template package, allowing for subsequent actions to inject unexpected content into templates.","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":"Errors returned from JSON marshaling may break template escaping in html/template","id":"CVE-2024-24785","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":2,"n_references":6,"next":{"headline":"Infinite loop in JSON unmarshaling in google.golang.org/protobuf","id":"CVE-2024-24786"},"packages":[{"ecosystem":"Bitnami","fixed":["1.21.8","1.22.1"],"introduced":["0","1.22.0-0"],"last_affected":[],"package":"golang","purl":"pkg:bitnami/golang","source":"BIT-golang-2024-24785"},{"ecosystem":"Go","fixed":["1.21.8","1.22.1"],"introduced":["0","1.22.0-0"],"last_affected":[],"package":"stdlib","purl":"pkg:golang/stdlib","source":"GO-2024-2610"}],"prev":{"headline":"Comments in display names are incorrectly handled in net/mail","id":"CVE-2024-24784"},"products":["html/template"],"published":"2024-03-05","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":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-03-14","vendors":["Go standard library"]},"summary":"Attackers can inject unexpected content into templates by exploiting errors from JSON marshaling, bypassing auto-escaping in Go's html/template package.","url":"https://insights.sbomify.com/CVE-2024-24785/"}