Skip to content

html/template: fix bypass for CVE-2026-27142 #78913

@thatnealpatel

Description

@thatnealpatel

CVE-2026-27142 fixed a vulnerability in which URLs were not
correctly escaped inside of a tag's attribute.
If the URL content were to insert ASCII whitespaces around the
= rune inside of the attribute, the escaper would
fail to similarly escape it, leading to XSS.

Dynamic inputs to a tag's attribute are now
whitespace sanitized prior to escaping.

Thanks to Samy Ghannad for reporting this issue.

This is CVE-2026-39823 and Go issue https://go.dev/issue/78913.


This was a PUBLIC track issue, tracked in http://b/495820486.

Metadata

Metadata

Assignees

Labels

BugReportIssues describing a possible bug in the Go implementation.NeedsFixThe path to resolution is known, but the work has not been done.Security

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions