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 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, causing improper escaping of data within the script block. This improper neutralization can lead to execution of injected scripts when the template is rendered. No patch or official remediation guidance is currently available. There are no known exploits in the wild at this time.
AI Analysis
Technical Summary
This vulnerability involves improper escaping of data passed into <script> blocks in Go's html/template package when the <script> tag has an empty or whitespace 'type' attribute. Under these conditions, the template engine fails to correctly neutralize input, leading to potential cross-site scripting attacks. The issue affects versions up to 1.26.0-0. No CVSS score or vendor advisory with patch information is currently available.
Potential Impact
Successful exploitation could allow an attacker to inject and execute arbitrary scripts in the context of a web page generated by the vulnerable Go html/template package. This could lead to typical XSS impacts such as session hijacking or unauthorized actions performed by the victim's browser. However, exploitation requires the template author to write a <script> tag with the specific malformed 'type' attribute, limiting the attack surface.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid using <script> tags with empty or whitespace-only 'type' attributes in templates authored with the Go html/template package.
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 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, causing improper escaping of data within the script block. This improper neutralization can lead to execution of injected scripts when the template is rendered. No patch or official remediation guidance is currently available. There are no known exploits in the wild at this time.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability involves improper escaping of data passed into <script> blocks in Go's html/template package when the <script> tag has an empty or whitespace 'type' attribute. Under these conditions, the template engine fails to correctly neutralize input, leading to potential cross-site scripting attacks. The issue affects versions up to 1.26.0-0. No CVSS score or vendor advisory with patch information is currently available.
Potential Impact
Successful exploitation could allow an attacker to inject and execute arbitrary scripts in the context of a web page generated by the vulnerable Go html/template package. This could lead to typical XSS impacts such as session hijacking or unauthorized actions performed by the victim's browser. However, exploitation requires the template author to write a <script> tag with the specific malformed 'type' attribute, limiting the attack surface.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid using <script> tags with empty or whitespace-only 'type' attributes in templates authored with the Go html/template package.
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: 5/7/2026, 8:06:25 PM
Last enriched: 5/7/2026, 8:21:48 PM
Last updated: 5/7/2026, 9:41:15 PM
Views: 4
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.