GO-2023-1751

Improper sanitization of CSS values in html/template

At a glance

Published
Updated
CVE
CVE-2023-24539
Aliases
BIT-golang-2023-24539

Description

Angle brackets (<>) are not considered dangerous characters when inserted into CSS contexts. Templates containing multiple actions separated by a '/' character can result in unexpectedly closing the CSS context and allowing for injection of unexpected HTML, if executed with untrusted input.

Affected packages

PackageVersions
Go · stdlibintroduced 0, fixed 1.19.9, introduced 1.20.0-0, fixed 1.20.4

References

Sources

SourceLicence
OSV.devCC-BY 4.0 — Go Vulnerability Database