What’s Vulnerable › Vulnerabilities
CVE-2023-24540: Improper handling of JavaScript whitespace in html/template
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.6% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-05-11 · updated 2026-06-17
- Weakness: CWE-77
Description
Not all valid JavaScript whitespace characters are considered to be whitespace. Templates containing whitespace characters outside of the character set "\t\n\f\r\u0020\u2028\u2029" in JavaScript contexts that also contain actions may not be properly sanitized during execution.
Affected products
- Go: before 1.19.9; from 1.20.0 before 1.20.4 — fixed in 1.19.9, 1.20.4
How to fix
Upgrade to a fixed version: Go 1.19.9, 1.20.4. Check the vendor advisory for mitigations.
References
- https://go.dev/cl/491616
- https://go.dev/issue/59721
- https://groups.google.com/g/golang-announce/c/MEb0UyuSMsU
- https://pkg.go.dev/vuln/GO-2023-1752
- https://go.dev/cl/491616
- https://go.dev/issue/59721
- https://groups.google.com/g/golang-announce/c/MEb0UyuSMsU
- https://pkg.go.dev/vuln/GO-2023-1752
- https://security.netapp.com/advisory/ntap-20241115-0008/
Get alerted when CVE-2023-24540 or the next vulnerability affects your stack