Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Medium

XSS in Go html/template meta refresh content attribute escaping

IdentifiersCVE-2026-27142CWE-79· Improper Neutralization of Input…

CVE-2026-27142 affects Go's html/template package. Actions that insert URLs into the content attribute of HTML meta tags were not properly escaped. In the specific case where the meta tag also includes http-equiv="refresh", the browser interprets the content attribute as a refresh directive containing a URL, and the missing escaping can permit attacker-controlled input to break out of the intended context and trigger cross-site scripting. The issue was fixed in the Go 1.26.1 / 1.25.8 security releases. The Go project also introduced a GODEBUG setting, htmlmetacontenturlescape, related to this escaping behavior; setting htmlmetacontenturlescape=0 disables the new escaping behavior for compatibility.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can result in cross-site scripting in applications that render untrusted data into the content attribute of a meta tag used for HTTP refresh behavior. This can enable execution of attacker-controlled script in the victim's browser in the security context of the affected application, with the usual downstream impacts of XSS such as session theft, request forgery, DOM manipulation, credential capture, or delivery of further client-side payloads.

Mitigation

If you can’t patch tonight, do this now.

As an interim mitigation, avoid placing untrusted or user-controlled data into the content attribute of meta tags, especially meta tags using http-equiv="refresh". If application behavior permits, remove or disable meta refresh usage and perform redirects server-side instead. Review templates for dynamic values rendered into meta content attributes and constrain them to trusted, validated URLs. Note that the GODEBUG setting htmlmetacontenturlescape=0 disables the protective escaping and should not be used as a security mitigation.

Remediation

Patch, then assume compromise.

Upgrade the Go toolchain to a fixed release that includes the html/template correction, specifically Go 1.26.1, Go 1.25.8, or later. Rebuild and redeploy affected applications with the updated toolchain so templates are generated with the corrected escaping behavior. Avoid relying on the compatibility toggle except as a temporary measure during migration.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
GolangGoapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

ACTIVITY FEED

Recent activity

17 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.

No news coverage yet. Advisories and community discussion only.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity17

Community discussion across Reddit, Mastodon, and other social sources.