GO-2026-4980

Escaper bypass leads to XSS in html/template

At a glance

Published
Updated
CVE
CVE-2026-39826
Aliases
BIT-golang-2026-39826

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 packages

PackageVersions
Go · stdlibintroduced 0, fixed 1.25.10, introduced 1.26.0-0, fixed 1.26.3

References

Sources

SourceLicence
OSV.devCC-BY 4.0 — Go Vulnerability Database