CVE-2026-39826: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Go standard library html/template
CVE-2026-39826 is a medium severity cross-site scripting (XSS) vulnerability in the Go standard library's html/template package. It occurs when a trusted template author includes a <script> tag with an empty or whitespace-only 'type' attribute, leading to improper escaping of data inside the script block. This can allow injection of malicious scripts if untrusted data is passed into the template. The vulnerability affects Go versions up to and including 1.26.0-0. There is no official patch or remediation guidance available, and no known exploits have been reported in the wild.
AI Analysis
Technical Summary
This vulnerability arises from improper neutralization of input during web page generation in the Go standard library's html/template package. Specifically, when a <script> tag has an empty or whitespace-only 'type' attribute, the template engine fails to properly escape data inside the script block. This can enable cross-site scripting (CWE-79) attacks if untrusted data is injected into such templates. The issue affects all versions up to and including 1.26.0-0. No official fix or mitigation has been released by the vendor as of the publication date.
Potential Impact
Successful exploitation could allow an attacker to inject malicious scripts into web pages generated by the vulnerable html/template package, potentially leading to partial confidentiality and integrity loss of user data within the affected application context. The CVSS score of 6.1 reflects a medium severity with network attack vector, low attack complexity, no privileges required, user interaction required, and scope change. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should avoid including <script> tags with empty or whitespace-only 'type' attributes in templates that process untrusted data. Careful review and sanitization of template inputs is recommended to reduce risk.
CVE-2026-39826: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in Go standard library html/template
Description
CVE-2026-39826 is a medium severity cross-site scripting (XSS) vulnerability in the Go standard library's html/template package. It occurs when a trusted template author includes a <script> tag with an empty or whitespace-only 'type' attribute, leading to improper escaping of data inside the script block. This can allow injection of malicious scripts if untrusted data is passed into the template. The vulnerability affects Go versions up to and including 1.26.0-0. There is no official patch or remediation guidance available, and no known exploits have been reported in the wild.
CVSS v3.1
Score 6.1medium
Affected software
pkg:golang/github.com/golang/go/html/templateRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability arises from improper neutralization of input during web page generation in the Go standard library's html/template package. Specifically, when a <script> tag has an empty or whitespace-only 'type' attribute, the template engine fails to properly escape data inside the script block. This can enable cross-site scripting (CWE-79) attacks if untrusted data is injected into such templates. The issue affects all versions up to and including 1.26.0-0. No official fix or mitigation has been released by the vendor as of the publication date.
Potential Impact
Successful exploitation could allow an attacker to inject malicious scripts into web pages generated by the vulnerable html/template package, potentially leading to partial confidentiality and integrity loss of user data within the affected application context. The CVSS score of 6.1 reflects a medium severity with network attack vector, low attack complexity, no privileges required, user interaction required, and scope change. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should avoid including <script> tags with empty or whitespace-only 'type' attributes in templates that process untrusted data. Careful review and sanitization of template inputs is recommended to reduce risk.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Go
- Date Reserved
- 2026-04-07T18:13:03.528Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69fcf0c1cbff5d86102bd5d7
Added to database: 05/07/2026, 20:06:25 UTC
Last enriched: 06/24/2026, 17:18:24 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 308
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.