CVE-2024-24785
MEDIUM5.4EPSS 0.92%Errors returned from JSON marshaling may break template escaping in html/template
Published: 3/5/2024Modified: 4/28/2026
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.
Affected packages (4)
- Bitnami/golangfrom 0, < 1.21.8, >= 1.22.0-0, < 1.22.1
- Debian/golang-1.15from 0
- Debian/golang-1.19from 0
- Go/stdlibfrom 0, < 1.21.8, >= 1.22.0-0, < 1.22.1
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 3.1 | MEDIUM5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N |
References (8)
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2024-24785
- PATCHhttps://go.dev/cl/564196
- REPORThttps://go.dev/issue/65697
- WEBhttps://groups.google.com/g/golang-announce/c/5pwGVUPoMbg
- WEBhttps://nvd.nist.gov/vuln/detail/CVE-2024-24785
- WEBhttps://pkg.go.dev/vuln/GO-2024-2610
- WEBhttps://security.netapp.com/advisory/ntap-20240329-0008/
- WEBhttp://www.openwall.com/lists/oss-security/2024/03/08/4