CVE-2026-56858 Fix Javascript regexp context tracking in html/template

Medium 6.1 Published Updated

Attackers can inject arbitrary content via pathological inputs in Go's html/template, leading to Cross-Site Scripting (XSS) and potential code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-56858?

CVE-2026-56858 is a medium-severity cross-site scripting vulnerability in Go standard library html/template, published on 13 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Previously, pathological inputs could close an unescaped '/' early, allowing for attack-controlled data to inject arbitrary content, potentially leading to XSS.

Weakness: CWE-79

Which versions are affected by CVE-2026-56858?

2 open source packages ship an affected version, including golang and stdlib.

PackageAffectedFixed in
golang BitnamiAll versions1.25.13, 1.26.6, 1.27.0
stdlib GoAll versions1.25.13, 1.26.6, 1.27.0-rc.3

How do I fix CVE-2026-56858?

Upgrade golang to a fixed version for your release line: 1.25.13, 1.26.6 or 1.27.0.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-56858 being exploited?

There is no known exploitation of CVE-2026-56858 in the wild and no public exploit code.

Sources

Also known as AZL-96650, AZL-96674, AZL-98964, BELL-CVE-2026-56858, BIT-golang-2026-56858, CLEANSTART-2026-CR23307 and 2156 more.

Is CVE-2026-56858 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free