GHSA-wpfx-qch4-q5j2
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted data to vulnerable template
-
ExploitBypass JS regex-literal escaping
-
ExecutionScript executes in victim browser
-
ImpactHijack session or act as user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires a Go application using html/template whose template includes a JavaScript template literal (backtick string) with consecutive '${...}' expressions followed by a regular-expression literal, with attacker-influenced data rendered into that context; the failure to reset context variables causes the subsequent regex literal to be escaped incorrectly, enabling injection. Limiting factors: this is confined to that specific JS-template-literal-plus-regex construct and is not triggered in ordinary HTML, attribute, or URL contexts; the application must pass untrusted data into the affected context and a victim must load the rendered page for XSS to fire. Not remotely exploitable against a default configuration without an application that both uses this template pattern and renders untrusted input. |
| Impact | No CVSS vector, EPSS score, KEV listing, POC, or SSVC data was supplied for CVE-2026-94448, so this assessment rests solely on the Go release announcement and go.dev/issue/81821. The flaw is an output-escaping correctness bug in Go's html/template: context-tracking state is not reset when a JavaScript template literal contains consecutive expressions, so a subsequent regular-expression literal may be escaped incorrectly, creating an XSS/injection exposure. Real-world risk is moderate-to-low despite Go's enormous deployment footprint, because exploitation requires a narrow and uncommon template construct (a JS template literal with consecutive '${...}' expressions immediately followed by a regex literal) AND untrusted data flowing into exactly that context - a pattern most Go web applications do not use. This is best characterized as a flaw in a ubiquitous product but with a rare trigger, i.e. low real-world exploitation likelihood rather than a widespread emergency. No exploitation signal (KEV/POC) is present, so routine patching via a Go toolchain upgrade is the appropriate priority, not an out-of-band emergency. |
| Exploit ScenarioDerived | An attacker supplies crafted input to a Go web application whose html/template renders a JavaScript template literal containing consecutive expressions followed by a regex literal; because the context tracker is not reset, the attacker-controlled data in the regex-literal context is not correctly escaped, letting the payload break out and execute as script in victims' browsers. No public exploit code was identified at time of analysis, and success depends on the application actually containing this specific template pattern with attacker-influenced data. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 08, 2026
Incorrect context-sensitive output escaping in Go's html/template package can enable cross-site scripting when a template contains a JavaScript template literal with consecutive "${...}" expressions followed by a regular-expression literal, because the package fails to reset its context-tracking state when entering a new expression. As a result, the following regex literal is not recognized as such and is escaped in the wrong JavaScript context, allowing attacker-influenced data rendered into that spot to break out of the JavaScript string/expression context. The issue affects applications built with Go 1.27.x before 1.27.2 and Go 1.26.x before 1.26.9, is fixed by those releases, and is rated CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N in the independent assessment; no public exploit code or confirmed active exploitation was identified at time of analysis, and a victim must load the rendered page for the XSS to fire.
RemediationAI
Vendor-released patch: rebuild and redeploy affected applications with Go 1.27.2 or Go 1.26.9; because the Go standard library is statically linked, upgrading the toolchain alone is insufficient - the application must be recompiled, and the fix is documented in the oss-security advisory (https://seclists.org/oss-sec/2026/q4/101) and Go issue https://go.dev/issue/81821. Upgrading also resolves the other net/http, crypto/tls, cmd/go, html/template and MIME parsing issues shipped in the same release (CVE-2026-97032, CVE-2026-78659, CVE-2026-97031, CVE-2026-94440, CVE-2026-94444, CVE-2026-94447 and the closely related html/template "|yield|" regexp-preceder bug CVE-2026-97030), so a single toolchain bump is the most efficient path. If an immediate rebuild is not possible, the actionable compensating controls are: remove or reorder the vulnerable construct in templates so a JavaScript template literal with consecutive expressions is not immediately followed by a regular-expression literal (side effect: requires template edits and regression testing of any JS-generating templates); pass untrusted values into JavaScript via structured data - encoding/json into a separate <script type="application/json"> block or a data attribute - instead of interpolating them inside a template literal (side effect: restructuring handler and template code, and JSON payloads must still be escaped for the script context); and deploy a restrictive Content-Security-Policy such as script-src 'self' without 'unsafe-inline' to prevent injected inline script execution, accepting that inline scripts and some third-party snippets will break and must be moved to allowed sources. Note that only templates using this narrow JS template-literal-plus-regex pattern are exposed, so an inventory of templates for backtick literals with consecutive ${...} followed by regex literals will identify the residual risk quickly.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
html/template is Go's context-aware HTML templating engine: it runs an internal state machine that tracks the output context (HTML text, attribute, URL, JS, CSS, etc.) and applies the correct escaping for each context. The bug lives in the JavaScript template-literal handling path: when the tracker encounters a backtick template literal containing several consecutive "${...}" expression entries, it fails to reset its context variables on entering each new expression. That stale state means a regular-expression literal that follows the expressions is not treated as a regexp, so it is escaped as ordinary JavaScript and the surrounding context is misjudged, opening an injection point. The practical consequence is client-side script injection (the classic output-escaping/XSS weakness family; no CWE identifier was supplied in the input data for this record). The affected component is the Go standard library consumed by any server-side Go web application that uses html/template and renders untrusted data into such a JavaScript template-literal-plus-regex construct; because html/template is compiled into the application binary, the fix is delivered only by rebuilding with a patched toolchain, not by swapping a shared library.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Delivered over the web (AV:N) with no attacker privileges (PR:N) but requiring an uncommon template construct and victim page load, so AC:H and UI:R; XSS crosses into the browser (S:C) with limited C/I impact and no availability loss.
Primary rating from Vendor (CNA).
CVSS VectorVendor
Lifecycle Timeline
2Description PRE-NVD
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
EUVD-2026-95415
NVD
CVE.org
EPSS
VulDB
Exploit-DB