Go Vulnerability Database
GO-2026-4980
Escaper bypass leads to XSS in html/template
Details
If a trusted template author were to write a <script> tag containing an empty 'type' attribute or a 'type' attribute with an ASCII whitespace, the execution of the template would incorrectly escape any data passed into the <script> block.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Go | stdlib | All versions before 1.25.10 (fixed in 1.25.10) From 1.26.0-0 before 1.26.3 (fixed in 1.26.3) |