{"id":"GO-2024-2610","summary":"Errors returned from JSON marshaling may break template escaping in html/template","details":"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.","aliases":["BIT-golang-2024-24785","CVE-2024-24785"],"modified":"2026-03-17T04:53:06.822256Z","published":"2024-03-05T22:15:40Z","related":["CGA-gx7j-g27r-6grj"],"database_specific":{"url":"https://pkg.go.dev/vuln/GO-2024-2610","review_status":"REVIEWED"},"references":[{"type":"REPORT","url":"https://go.dev/issue/65697"},{"type":"FIX","url":"https://go.dev/cl/564196"},{"type":"WEB","url":"https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg"}],"affected":[{"package":{"name":"stdlib","ecosystem":"Go","purl":"pkg:golang/stdlib"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.21.8"},{"introduced":"1.22.0-0"},{"fixed":"1.22.1"}]}],"ecosystem_specific":{"imports":[{"symbols":["Template.Execute","Template.ExecuteTemplate","escaper.commit","jsValEscaper"],"path":"html/template"}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2024-2610.json"}}],"schema_version":"1.7.5","credits":[{"name":"RyotaK (https://ryotak.net)"}]}