6.1Medium

CVE-2026-32289JsBraceDepth Context Tracking Bugs (XSS) in html/template

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

Description

Context was not properly tracked across template branches for JS template literals, leading to possibly incorrect escaping of content when branches were used. Additionally template actions within JS template literals did not properly track the brace depth, leading to incorrect escaping being applied. These issues could cause actions within JS template literals to be incorrectly or improperly escaped, leading to XSS vulnerabilities.

Weakness (CWE): CWE-79

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.9, 1.26.0-0 – < 1.26.2
golang go < 1.25.9

References and patches

CPE matches (NVD) (2)

  • cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* < 1.25.9
  • cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* ≥ 1.26.0 < 1.26.2