Skip to main content

Go html/template EUVDEUVD-2026-95415

| CVE-2026-94448 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
6.1
CVSS 3.1 · Vendor
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply crafted data to vulnerable template
  2. Exploit
    Bypass JS regex-literal escaping
  3. Execution
    Script executes in victim browser
  4. Impact
    Hijack 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

html/template 0 <1.26.9
html/template 1.27.0-0 <1.27.2

Affected Packages

go stdlib fix: 1.26.9, 1.27.2
euvd html_template fix: 1.26.9, 1.27.2

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

Vendor (CNA) PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 4.7 MEDIUM

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.

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Red Hat 6.1 MEDIUM

Primary rating from Vendor (CNA).

CVSS VectorVendor

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
CVSS changed
Oct 15, 2026 - 16:22 NVD
6.1 (MEDIUM)
CVE Published
Oct 08, 2026 - 19:26 oss-security
MEDIUM

Description PRE-NVD

Disclosed via oss-security. NVD scoring and full description are pending.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
High
Go standard-library html/template, a widely deployed backend web language
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
High

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy