# CVE-2023-24540: Improper handling of JavaScript whitespace in html/template

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.56%, higher than 75% of CVEs (2026-12-01)
- Published: 2023-05-05T21:10:22.000Z
- Modified: 2026-09-08T08:47:49.069Z
- Also known as: GO-2023-1752, BIT-GOLANG-2023-24540
- Related: CGA-c9q8-wf86-p6mw
- Weaknesses: CWE-74, CWE-77
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: Go

## 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.

(As written by CVE List.)

## Affected

- html/template: before 1.19.9; from 1.20.0-0 before 1.20.4
- stdlib (Go): before 1.19.9; from 1.20.0-0 before 1.20.4
- golang go: before 1.19.9; from 1.20.0 before 1.20.4
- golang (Bitnami): before 1.19.9; from 1.20.0 before 1.20.4

## Every score

- CISA-ADP: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://go.dev/issue/59721> (fix, issue-tracking, patch, report)
- <https://go.dev/cl/491616> (fix, patch)
- <https://groups.google.com/g/golang-announce/c/MEb0UyuSMsU> (discussion, mailing-list, release-notes, web)
- <https://pkg.go.dev/vuln/GO-2023-1752> (advisory, vendor-advisory)
- <https://security.netapp.com/advisory/ntap-20241115-0008/> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-24540> (web)

## Sources

- CVE List: [CVE-2023-24540](https://www.cve.org/CVERecord?id=CVE-2023-24540), CVE Terms of Use, modified 2025-01-24
- Go Vulnerability Database: [GO-2023-1752](https://pkg.go.dev/vuln/GO-2023-1752), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2023-24540](https://nvd.nist.gov/vuln/detail/CVE-2023-24540), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-GOLANG-2023-24540](https://osv.dev/vulnerability/BIT-GOLANG-2023-24540), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2023-24540 · Whole record: https://cve.day/CVE-2023-24540.json · Rebuilt by cve.day 2026-11-25T22:58:24.101Z
