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

XSS in Go html/template JS template literal escaping

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

CVE-2026-32289 is a cross-site scripting vulnerability in Go's html/template package. The flaw arises from incorrect context tracking for JavaScript template literals: context was not properly preserved across template branches, and template actions embedded within JavaScript template literals did not correctly track brace depth. As a result, html/template could apply incorrect or insufficient escaping to action output rendered inside JavaScript template literals. According to the provided context, the issue only affects templates that use template actions within JavaScript template literals.

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 cause untrusted data rendered through affected html/template templates to be improperly escaped in JavaScript template literal contexts, enabling cross-site scripting. In practice, this can allow attacker-controlled script execution in a victim's browser within the security context of the vulnerable application, potentially leading to session theft, unauthorized actions, data exfiltration, or other client-side compromise.

Mitigation

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

If immediate upgrade is not possible, avoid placing template actions inside JavaScript template literals in html/template output, especially in templates with branching logic that may alter parsing context. Refactor templates so untrusted data is not interpolated directly into JavaScript template literals, or move dynamic data into safer contexts with explicit, context-appropriate encoding and validation. Review affected templates for action usage inside JS template literals until patched versions can be deployed.

Remediation

Patch, then assume compromise.

Upgrade Go to a fixed release that includes the html/template correction for CVE-2026-32289. The provided context states this issue was addressed in Go 1.26.2 and Go 1.25.9.
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.

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 activity7

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