Skip to main content

CVE-2026-94448: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Go standard library html/template

0
High
VulnerabilityCVE-2026-94448cvecve-2026-94448cwe-79
Published: 10/08/2026 (10/08/2026, 22:53:57 UTC)
Source: CVE Database V5
Vendor/Project: Go standard library
Product: html/template

Description

CVE-2026-94448 is a cross-site scripting (XSS) vulnerability in the Go standard library's html/template package. The flaw occurs when JavaScript template literals contain consecutive expressions, causing improper context tracking and failure to reset state correctly. This leads to incorrect escaping of subsequent regular expression literals, potentially allowing injection of malicious scripts.

Affected software

Go standard library

html/template

Affected versions
>=0 <1.26.9>=1.27.0-0 <1.27.2
html/template
pkg:golang/html/template
Affected versions
>=0 <1.26.9>=1.27.0-0 <1.27.2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/08/2026, 23:18:59 UTC

Technical Analysis

The vulnerability arises because the context tracking state in the html/template package was not properly reset upon entering a new expression within JavaScript template literals containing consecutive expressions. This improper neutralization of input during web page generation (CWE-79) can result in incorrect escaping of regular expression literals following these expressions. The fix ensures that template-literal expression entries correctly reset context variables so that all subsequent regular expression literals are accurately recognized and escaped.

Potential Impact

If exploited, this vulnerability could allow an attacker to inject malicious JavaScript code into web pages generated using the affected versions of the Go html/template package, leading to cross-site scripting attacks. This could compromise the security of users by executing arbitrary scripts in their browsers. However, there are no known exploits in the wild at this time.

Mitigation Recommendations

A fix is available in Go standard library versions 1.26.9 and 1.27.2 and later. Users should upgrade to these or later versions to mitigate this vulnerability. Since this is a library vulnerability, updating the affected versions of the html/template package is the recommended remediation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
Go
Date Reserved
2026-09-21T16:43:04.758Z
State
PUBLISHED

Threat ID: 6ac821662cdf04f656417219

Added to database: 10/08/2026, 23:04:06 UTC

Last enriched: 10/08/2026, 23:18:59 UTC

Last updated: 10/08/2026, 23:19:11 UTC

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses