Skip to content

html/template: URLs in meta content attribute actions are not escaped (CVE-2026-27142) #77954

@thatnealpatel

Description

@thatnealpatel

Actions which insert URLs into the content attribute of HTML meta tags are not
escaped. This can allow XSS if the meta tag also has an http-equiv attribute
with the value "refresh".

A new GODEBUG setting has been added, htmlmetacontenturlescape, which can be
used to disable escaping URLs in actions in the meta content attribute which
follow "url=" by setting htmlmetacontenturlescape=0.

This is CVE-2026-27142 and Go issue #77954.


This is a PRIVATE issue for CVE-2026-27142, tracked in http://b/474107689.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions