CVE-2023-24540

published 11 May 2023 · updated 12 Nov 2026

Improper handling of JavaScript whitespace in html/template

9.8CriticalCVSS 9.8EPSS 2%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. Fixed in 1.19.9 and 1.20.4.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
Go standard library<1.19.9, >=1.20.0-0 <1.20.41.19.9, 1.20.4

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2023-24540 severity on Zeptric[![CVE-2023-24540](https://zeptric.io/badge/cve/CVE-2023-24540.svg)](https://zeptric.io/cve/CVE-2023-24540)