CVE-2026-39826

Escaper bypass leads to XSS in html/template

Published May 7, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-79
Type Values Removed Values Added
First Time appeared Golang
Golang go
Weaknesses CWE-116
CPEs cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*
Vendors & Products Golang
Golang go
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-79
Type Values Removed Values Added
First Time appeared Go Standard Library
Go Standard Library html/template
Vendors & Products Go Standard Library
Go Standard Library html/template
Type Values Removed Values Added
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.
Title Escaper bypass leads to XSS in html/template
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
May 8, 2026, 2:05 PM
Reserved
Apr 7, 2026, 6:13 PM
Status
Analyzed
Published
May 7, 2026, 8:16 PM
Modified
Oct 26, 2026, 8:10 PM