CVE-2026-27142

URLs in meta content attribute actions are not escaped in html/template

State
Published
Severity
6.1 Medium
Published
Mar 6, 2026
Updated
Mar 16, 2026
Reserved
Feb 17, 2026

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.16.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NCISA-ADP

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
html/templateGo standard library
  • before 1.25.8Affected
  • 1.26.0-0 to before 1.26.1Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.