{"id":"CVE-2024-24785","published":"2024-03-05T22:22:33Z","modified":"2025-03-14T00:55:26Z","title":"Errors returned from JSON marshaling may break template escaping in html/template","vendor":"Go standard library","product":"html/template","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00908,"percentile":0.57968,"provenance":"source"},"cwes":[],"references":[{"url":"https://go.dev/issue/65697","tags":[]},{"url":"https://go.dev/cl/564196","tags":[]},{"url":"https://groups.google.com/g/golang-announce/c/5pwGVUPoMbg","tags":[]},{"url":"https://pkg.go.dev/vuln/GO-2024-2610","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20240329-0008/","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2024/03/08/4","tags":[]}],"priority":{"score":15.4,"factors":[{"name":"EPSS percentile","points":11.59},{"name":"CVSS severity","points":3.78}]},"vendorSlug":"go-standard-library","affectedVersions":[{"vendor":"Go standard library","product":"html/template","versions":["< 1.21.8",">= 1.22.0-0, < 1.22.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-03-06T18:49:44.784868Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"stdlib","vulnerableRanges":["<1.21.8",">=1.22.0-0, <1.22.1"],"patched":["1.21.8","1.22.1"],"from":["GO-2024-2610"],"provenance":"source"}],"summary":{"text":"The flaw lies in the Go standard library's html/template package: errors returned from MarshalJSON methods that contain user-controlled data can break its contextual auto-escaping. An attacker who can supply that data and has low-privilege access, with no user interaction required, can cause unexpected content to be injected into templates through subsequent actions.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:33:58Z"},"euvd":{"id":"EUVD-2024-22163","exploited":false,"provenance":"source"}}