Skip to main content

Go html/template EUVDEUVD-2026-58512

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

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
qualitative
Red Hat
8.1 HIGH
qualitative

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

4
CVSS changed
Aug 14, 2026 - 16:22 NVD
6.1 (MEDIUM)
Patch available
Aug 13, 2026 - 23:04 EUVD
Analysis Generated
Aug 13, 2026 - 22:19 vuln.today
CVE Published
Aug 13, 2026 - 20:40 oss-security
MEDIUM

Description PRE-NVD

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

AnalysisAI

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.

Technical ContextAI

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.

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.

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

Share

EUVD-2026-58512 vulnerability details – vuln.today

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