Skip to main content

Go html/template CVE-2026-39823

| EUVDEUVD-2026-28424 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-05-07 Go GHSA-2283-wf8c-rw8r
6.1
CVSS 3.1 · Vendor: Go
View

Attack ChainAIDerived

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

  1. Access
    Attacker crafts URL with whitespace around equals
  2. Delivery
    Submits payload via form or URL parameter
  3. Exploit
    Application renders URL into meta tag content attribute via html/template
  4. Execution
    Escaper fails to encode whitespace, breaking attribute boundary
  5. Persist
    Browser parses malformed HTML as separate attributes
  6. Impact
    JavaScript in injected attribute executes in victim's session

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 the following specific conditions: (1) The application must use Go's html/template package to render HTML output; (2) User-controlled input (from forms, URL parameters, database, or API responses) must be inserted into a meta tag's content attribute without additional input validation; (3) The input must contain ASCII whitespace characters (space, tab, newline, carriage return) positioned immediately before or after an equals sign; (4) A user must view or interact with the resulting HTML document (e.g., by loading the page or sharing it socially, triggering meta tag parsing). Applications that only use html/template for non-meta-tag content, or that sanitize input before templating, are not vulnerable. Default configurations of Go applications are vulnerable if meta tag content is dynamically populated; however, static meta tags are not affected. The vulnerability does not require authentication to the application and does not depend on server configuration beyond use of the standard library.

Impact

This vulnerability presents moderate real-world risk despite the low EPSS score of 0.01% (1st percentile). The discrepancy warrants explanation: EPSS is calibrated for widespread, easy-to-exploit vulnerabilities, and this flaw requires both user interaction (UI:R) and careful crafting of the payload to position whitespace correctly around the equals sign, which limits its automation potential. However, the CVSS score of 6.1 (medium) accurately reflects the cross-boundary scope (S:C), which allows the XSS to affect confidentiality and integrity across user sessions or trust boundaries. The attack vector is network-based and requires no authentication (AV:N/PR:N), making it exploitable by any attacker who can control template input-a realistic scenario for user-generated content platforms, comment systems, or misconfigured templating contexts. The low EPSS does not indicate low priority: this is a pattern-matching edge case that skilled attackers might exploit once discovered, particularly in applications that accept user-controlled URLs in meta tags (e.g., Open Graph tags in social media sharing). The fact that this is a regression from a prior CVE (CVE-2026-27142) increases confidence that the vulnerability is real and exploitable; defenders should prioritize patching Go standard library versions, especially in production web services. The UI:R requirement (user must click/interact) reduces impact scope compared to passive XSS, but does not eliminate it in realistic workflows.

Exploit ScenarioDerived

An attacker crafts a malicious URL containing ASCII whitespace around an equals sign, such as 'https://example.com?param = value%22 onload=%22alert(1)', and submits it through a form field that is later rendered by the application into an Open Graph meta tag via html/template. When a victim shares the page on social media or views the source, the browser's HTML parser interprets the whitespace-separated equals as multiple attributes, breaking out of the original content attribute context and executing the injected JavaScript. The attacker gains session access or credential theft via keylogging.

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

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

Alert me

AnalysisAIv1 – May 08, 2026

Cross-site scripting (XSS) vulnerability in Go's html/template library allows attackers to bypass URL escaping in meta tag content attributes by inserting ASCII whitespaces around the equals sign, enabling injection of malicious scripts into web applications. Affects Go 1.25.x before 1.25.10 and 1.26.x before 1.26.3. This is a regression from CVE-2026-27142 where the fix was incomplete, and exploitation requires user interaction (UI:R) but operates across security boundaries (S:C).

RemediationAI

Upgrade to Go 1.25.10 or later for the 1.25.x series, or to Go 1.26.3 or later for the 1.26.x series. These patched versions restore correct escaping of whitespace characters around equals signs in meta tag content attributes. Users unable to upgrade immediately should implement input validation on any user-controlled URLs destined for meta tag content attributes, specifically stripping or rejecting ASCII whitespace characters (space, tab, newline, carriage return) in positions immediately before or after equals signs. Additionally, adopt a Content Security Policy (CSP) header with script-src 'self' (or more restrictive) to provide defense-in-depth against XSS injection, though this does not replace the patch. For applications serving untrusted content in meta tags (e.g., social sharing previews), consider using a dedicated HTML sanitizer library (e.g., bluemonday for Go) in addition to template escaping, though note this adds processing overhead and must be carefully configured to not strip legitimate Open Graph metadata.

Affected VersionsENISA

html/template 0 <1.25.10
html/template 1.26.0-0 <1.26.3

Affected Packages

go stdlib fix: 1.25.10, 1.26.3
euvd html_template fix: 1.25.10, 1.26.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

The Go html/template package is the standard library's HTML templating engine, which automatically escapes values inserted into HTML templates to prevent injection attacks. The vulnerability exists in the URL escaper component that processes content attributes within HTML meta tags. When a URL contains ASCII whitespaces adjacent to an equals sign ('='), the escaper incorrectly fails to encode these characters, allowing an attacker to break out of the attribute context and inject arbitrary HTML/JavaScript. This is a character-encoding edge case in the escaping logic; the root cause is incomplete validation of all whitespace variants that could alter HTML parsing semantics. The issue was introduced as a partial fix to CVE-2026-27142, indicating that the initial remediation did not account for all dangerous input patterns.

Know when Html Template gets its next vulnerability

  • 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 (Go) PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
SUSE MEDIUM
Red Hat 5.4 MEDIUM

Primary rating from Vendor (Go).

CVSS VectorVendor: Go

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
May 08, 2026 - 15:22 NVD
6.1 (MEDIUM)
Patch available
May 07, 2026 - 21:02 EUVD
CVE Published
May 07, 2026 - 19:41 nvd
UNKNOWN (no severity yet)
CVE Published
May 07, 2026 - 19:41 nvd
MEDIUM 6.1

DescriptionCVE.org

CVE-2026-27142 fixed a vulnerability in which URLs were not correctly escaped inside of a <meta> tag's <content> attribute. If the URL content were to insert ASCII whitespaces around the '=' rune inside of the <content> attribute, the escaper would fail to similarly escape it, leading to XSS.

Threat Intelligence Overview

EPSS Score
0.0%
Top 99% exploitable
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

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.0%
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
Medium
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: Medium
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