What’s Vulnerable › Vulnerabilities

CVE-2026-39826: Escaper bypass leads to XSS in html/template

Description

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 products

How to fix

Upgrade to a fixed version: Go 1.25.10, 1.26.3; Go Stdlib 1.25.10, 1.26.3. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2026-39826 or the next vulnerability affects your stack