CVE-2026-39826: Escaper bypass leads to XSS in html/template

Published May 7, 2026
·
Updated

If a trusted template author were to write a <script> tag containing an empty 'type' attribute or a 'type' attribute with an ASCII whitespace, the execution of the template would incorrectly escape any data passed into the <script> block.

Affected Software

3 affected components
golang/html/template
Golang Go<1.25.10
Golang Go>=1.26.0<1.26.3

Remediation

Event History

May 7, 2026
CVE Published
via MITRE·07:41 PM
Data Sourced
via MITRE·07:41 PM
DescriptionWeakness
Data Sourced
via NVD·08:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-39826?

CVE-2026-39826 has a medium severity rating due to its potential for cross-site scripting (XSS) attacks.

2

How do I fix CVE-2026-39826?

To mitigate CVE-2026-39826, ensure that templates do not allow untrusted input to be passed into <script> blocks.

3

What products are affected by CVE-2026-39826?

CVE-2026-39826 affects the golang/html/template library.

4

What vulnerability type is CVE-2026-39826 associated with?

CVE-2026-39826 is associated with cross-site scripting (XSS) due to improper escaping in templates.

5

What causes the vulnerability in CVE-2026-39826?

The vulnerability occurs when a <script> tag contains an empty 'type' attribute or a 'type' attribute with ASCII whitespace, leading to incorrect data escaping.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203