What’s Vulnerable › Vulnerabilities

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

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

How to fix

Upgrade to a fixed version: Go 1.19.9, 1.20.4. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2023-24540 or the next vulnerability affects your stack