CVE-2026-27142 PUBLISHED

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

Assigner: Go
Reserved: 17.02.2026 Published: 06.03.2026 Updated: 06.03.2026

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.

Product Status

Vendor Go standard library
Product html/template
Versions Default: unaffected
  • affected from 0 to 1.25.8 (excl.)
  • affected from 1.26.0-0 to 1.26.1 (excl.)

References

Problem Types

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')