6.1Medium

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

Go standard library html/template Published: (6 months ago)

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.

Weakness (CWE): CWE-79CWE-116

Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.

Affected products and versions

VendorProductVersions
Go standard library html/template < 1.25.10, 1.26.0-0 – < 1.26.3
golang go < 1.25.10

References and patches

CPE matches (NVD) (2)

  • cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* < 1.25.10
  • cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* ≥ 1.26.0 < 1.26.3