PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-39826 Go standard library CVE debrief

A vulnerability in the Go standard library's html/template package allows for an escaper bypass leading to cross-site scripting (XSS). If a trusted template author writes a <script> tag with an empty 'type' attribute or a 'type' attribute containing ASCII whitespace, the template execution will incorrectly escape data passed into the <script> block.

Vendor
Go standard library
Product
stdlib
CVSS
Unknown
CISA KEV
Not listed in stored evidence
Original CVE published
2026-05-07
Original CVE updated
2026-11-14
Advisory published
2026-05-07
Advisory updated
2026-11-14

Who should care

Defenders responsible for Go applications using the html/template package, particularly those with user-generated or untrusted template data, should assess exposure and prioritize updates to prevent exploitation.

Why it matters

CVE-2026-39826 is a vulnerability in the Go standard library's html/template package that allows for an escaper bypass leading to cross-site scripting (XSS). Defenders should prioritize reviewing and updating template authors' code, focusing on <script> tags and their attributes, and update affected Go versions to 1.25.10 or 1.26.3. The vulnerability's impact is limited by the need for a trusted template author to write specific <script> tags, and its exploitation requires careful analysis of template data and execution.

  • Potential for XSS attacks through malicious template data
  • Need for review and update of template authors' code
  • Requirement for version updates to 1.25.10 or 1.26.3
  • Importance of monitoring template executions for suspicious activity

Technical summary

The Go standard library's html/template package is vulnerable to an escaper bypass, allowing for cross-site scripting (XSS) attacks. This occurs when a trusted template author writes a <script> tag with an empty 'type' attribute or a 'type' attribute containing ASCII whitespace, causing the template execution to incorrectly escape data passed into the <script> block. The vulnerability's impact is limited by the need for a trusted template author to write specific <script> tags, and its exploitation requires careful analysis of template data and execution.

Defensive priority

Defenders should prioritize reviewing and updating template authors' code to prevent exploitation, focusing on <script> tags and their attributes.

Recommended defensive actions

  • Review template authors' code for <script> tags with empty or whitespace-containing 'type' attributes
  • Update affected Go versions to 1.25.10 or 1.26.3
  • Monitor for suspicious template executions
  • Confirm whether affected product deployments exist in managed environments and assign an owner for follow-up
  • Review the supplied official advisory or CVE record to validate affected scope, severity, and vendor guidance
  • Plan vendor-supported updates or mitigations through normal change control where exposure is confirmed
  • Check relevant monitoring, detection, and logs for exposed assets that need extra review

Evidence notes

The vulnerability was reported in the Go issue tracker and fixed in versions 1.25.10 and 1.26.3. The NVD entry is currently null. Evidence is limited to public sources and may not reflect the full scope of affected products or potential impacts. Defenders should verify the vulnerability's presence in their environments and review template authors' code for potential exposure.

Sources and references

Verified primary and authoritative sources

  • CVE-2026-39826 CVE Program record

    Publisher, destination, and source semantics verified

    URL: https://www.cve.org/CVERecord?id=CVE-2026-39826

    CVE Program - Official CVE Program record with source-provided CVE metadata.

  • CVE-2026-39826 NVD vulnerability detail

    Publisher, destination, and source semantics verified

    URL: https://nvd.nist.gov/vuln/detail/CVE-2026-39826

    NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.

Supplemental references

  • Escaper bypass leads to XSS in html/template

    Unverified legacy reference

    URL: https://storage.googleapis.com/osv-vulnerabilities/Go/GO-2026-4980.json

    osv_dev

  • Source reference

    Unverified legacy reference

    URL: https://go.dev/issue/78981

    Supplemental source

  • Source reference

    Unverified legacy reference

    URL: https://go.dev/cl/771180

    Supplemental source

  • Source reference

    Unverified legacy reference

    URL: https://groups.google.com/g/golang-announce/c/qcCIEXso47M

    Supplemental source

Methodology and review provenance

AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.