All CVEs / Go standard library
CVE-2024-24785Go standard library html/template
Medium 5.4
Follow: this CVE · Go standard library · Go standard library html/template We alert you by email or Slack (account required).
- Priority
- 32
- CVSS 3.1
- 5.4
- EPSS
- 0.9% probability of exploitation in 30 days · percentile 58
- Auth required
- Yes
- Published
- Mar 5, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for html/template.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | stdlib |
< 1.21.8 |
1.21.8 |
go get stdlib@v1.21.8 |
| Go | stdlib |
≥ 1.22.0-0 < 1.22.1 |
1.22.1 |
go get stdlib@v1.22.1 |
Per OSV / GitHub Advisories (GO-2024-2610). Check the version in your lockfile before upgrading.
Affected products
- Go standard library · html/template
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official advisories
- Red Hat Security Advisory: container-tools:rhel8 security update · Red Hat · RHSA-2026:3428 · Feb 27, 2026 High
- Red Hat Security Advisory: OpenShift Container Platform 4.16.0 security update · Red Hat · RHSA-2024:0045 · Oct 2, 2024 High
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.