Skip to main content
VulnerabilityPublished

CVE-2026-39826: Go standard library html/template · Cross-site Scripting

Affects Go standard library html/templateSource CVE Database V5

0
Compare

Not known to be exploited · CVSS 6.1 Medium : upgrade to 1.26.3 or 1.25.10 when convenient.

Data as of 30 Oct 2026, 11:52 UTC

CVSS 3.1 base score
6.1Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 30% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 1.26.3, 1.25.10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 7 May 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Upgrade Go standard library html/template to 1.26.3 or 1.25.10.

Affected software

ProductAffectedFixed in
Go standard libraryhtml/templateAffected
  • >=1.26.0-0 <1.26.3
Fixed in
  • 1.26.3
Go standard libraryhtml/templateAffected
  • <1.25.10
Fixed in
  • 1.25.10
Gohtml/templatepkg:golang/html/templateOther threatsAffected
  • <1.25.10
  • >=1.26.0-0 <1.26.3
Fixed in
  • 1.25.10
  • 1.26.3
Gogithub.com/golang/go/html/templatepkg:golang/github.com/golang/go/html/templateOther threatsAffected
  • =0
  • =1.26.0-0
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

If you cannot patch yet, 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.

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.

References

Community reviews

Loading reviews…