CVE-2026-94448: Go html/template XSS via stale context in consecutive expressions

CVE-2026-94448 · Severity: medium · CVSS 6.1 · Published 2026-10-08

Go's html/template package, used to safely render HTML and JavaScript in web applications, fails to properly track parsing context when processing consecutive JavaScript template literal expressions. An attacker can exploit this to inject malicious JavaScript code that bypasses the template's escaping protections, leading to cross-site scripting (XSS) attacks.

Technologies: go (Go), stdlib (Go). Vendors: Go.

Quick answers

Is CVE-2026-94448 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-94448 being exploited in the wild.
How severe is CVE-2026-94448?
Medium severity, with a CVSS score of 6.1, published 8 October 2026.
Which products and versions are affected?
go (Go) prior to fix; stdlib (Go) SEMVER:introduced=0,fixed=1.26.9,introduced=1.27.0-0,fixed=1.27.2.
Is there a fix for CVE-2026-94448?
Yes. stdlib (Go): upgrade to 1.27.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-94448 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-94448?
Check whether you run go (Go) or stdlib (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • stdlib (Go): upgrade to 1.27.2 or later
    go get stdlib@v1.27.2

Technical details

The vulnerability exists in html/template's context tracking for JavaScript template literals containing consecutive expressions (e.g., `${expr1}${expr2}`). The parser fails to reset its context state upon entering a new template expression, causing subsequent regular expressions to be misidentified and improperly escaped. This allows attackers to inject unescaped JavaScript through crafted template literals, bypassing XSS protections.

Affected products

  • Go Go prior to fix

Identifiers

  • CVE-2026-94448
  • GO-2026-6599

Timeline

  • 2026-10-08: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.