Skip to main content

Go html/template CVE-2026-56858

| EUVDEUVD-2026-58512 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. Recon
    Identify Go web app using html/template with JS regexp context
  2. Delivery
    Craft pathological input to trigger premature regexp context exit
  3. Exploit
    Submit input via normal app input channel (form, URL parameter, API)
  4. Install
    Template engine emits attacker data without JS escaping
  5. C2
    Victim user loads rendered page in browser
  6. Execute
    Injected script executes in browser context
  7. Impact
    Session theft or credential harvesting

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

Exploitation requires that the vulnerable application use Go's html/template package (not text/template) to render attacker-controlled data in a template that contains a JavaScript regexp literal. The pathological input must be crafted to trigger the premature regexp context exit via the unescaped forward-slash handling bug. Applications that do not pass untrusted user input into JavaScript regexp template contexts are not exploitable even if built with a vulnerable Go version. Additionally, for XSS impact to materialize, a victim user must load or interact with the page containing the injected content in their browser. Authentication requirements cannot be confirmed from available data as no CVSS vector was provided - exploitation prerequisites depend entirely on whether the affected template endpoint requires authentication in the specific application.

Impact

No CVSS vector or EPSS score was provided for this CVE, preventing precise metric-based triage. The vulnerability class - XSS through a context-tracking bypass in a widely used templating engine - is inherently significant for web-facing Go applications. However, exploitation is conditional: an attacker must be able to supply pathological input that reaches a template rendering within a JavaScript regexp literal context, a specific combination that limits the realistic affected population to a subset of Go web applications. No KEV listing and no public exploit code have been identified, indicating this has not yet seen active exploitation in the wild. Even a mid-sized municipal IT team in ustka running Go-based web services should treat this as a standard patch-cycle priority rather than an emergency response item, given the absence of active exploitation signals and the specificity of the required exploitation conditions. The primary risk is elevated for applications that render rich, user-controlled data into JavaScript-heavy HTML templates.

Exploit ScenarioDerived

An attacker identifies a Go web application using html/template to render user-supplied form input or URL parameters within an HTML page that includes a JavaScript regexp literal in its template. The attacker crafts a pathological string that causes the template engine's regexp context tracker to exit the regexp parsing state prematurely when the unescaped forward-slash is misinterpreted as a terminator. The subsequent attacker-controlled data is then output without proper JavaScript escaping, injecting a script payload that executes in the victim user's browser when the page is loaded, enabling session token theft or credential harvesting. No public exploit code has been identified at time of analysis.

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 – Aug 13, 2026

Cross-site scripting via JavaScript regexp context tracking bypass in Go's html/template standard library package allows injection of arbitrary content into rendered HTML pages. The template engine's context tracker incorrectly handles an unescaped forward-slash delimiter in pathological inputs, causing premature exit from the JavaScript regexp parsing context and permitting attacker-controlled data to be emitted as raw, unescaped JavaScript. All Go releases prior to 1.26.6 and 1.25.13 are affected; no public exploit has been identified at time of analysis and this CVE is not listed in CISA KEV.

RemediationAI

Upgrade the Go toolchain to version 1.26.6 or 1.25.13, released August 13, 2026, which contain the fix for this issue (Go issue https://go.dev/issue/80435). Because html/template is part of the Go standard library and is statically linked at compile time, all Go applications must be recompiled after upgrading the toolchain to incorporate the fix - merely upgrading the runtime is insufficient. Release notes are available at https://go.dev/doc/devel/release#go1.26.6. As a compensating control prior to patching, audit templates to identify any location where attacker-controlled data is rendered inside a JavaScript regexp literal context, and refactor those locations to avoid direct embedding of untrusted input; however, this approach requires thorough template auditing and is not a reliable substitute for the toolchain upgrade. Container images and CI/CD pipelines building Go applications should be updated to reference the patched base toolchain versions.

Affected VersionsENISA

html/template 1.26.0-0 <1.26.6
html/template 1.27.0-0 <1.27.0-rc.3
html/template 0 <1.25.13

Affected Packages

go stdlib fix: 1.25.13, 1.26.6, 1.27.0-rc.3
euvd html_template fix: 1.25.13, 1.26.6, 1.27.0-rc.3

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

Go's html/template package extends the text/template package with context-aware escaping to safely embed untrusted data into HTML documents. The engine maintains an internal parse state machine that tracks the current rendering context - HTML body, attribute, JavaScript string, JavaScript regexp, CSS, and others - to apply the correct escaping function before output. The vulnerability is in the JavaScript regexp context transition logic: certain pathological inputs cause the state machine to interpret an unescaped forward-slash character as a regexp terminator prematurely, incorrectly transitioning the parser out of the regexp context. Any template data rendered after this point is emitted under the wrong escaping rules, allowing injection of arbitrary JavaScript. This is consistent with CWE-79 (Improper Neutralization of Input During Web Page Generation), specifically a context-tracking failure in a component that exists precisely to prevent such issues. No CPE strings were provided in the input data; affected packages are the html/template standard library components shipped with Go prior to 1.26.6 and 1.25.13.

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

Network-reachable web app but AC:H for specific JS regexp template slot requirement; UI:R and S:C reflect XSS browser scope change; no availability impact.

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:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
SUSE MEDIUM
Red Hat 8.1 HIGH

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

3
CVSS changed
Aug 14, 2026 - 16:22 NVD
6.1 (MEDIUM)
Patch available
Aug 13, 2026 - 23:04 EUVD
CVE Published
Aug 13, 2026 - 20:40 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 90% exploitable
Prevalence
High
standard library package in widely-deployed Go web applications
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor VulDB

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
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

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

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Affected
SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS Affected

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