CVE-2026-56858

Fix Javascript regexp context tracking in html/template

Published Aug 13, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
Previously, pathological inputs could close an unescaped '/' early, allowing for attack-controlled data to inject arbitrary content, potentially leading to XSS.

Analysis

AI-generated

Technical impact

The vulnerability is a flaw in Go’s html/template package that mishandles JavaScript regular expression syntax. By prematurely closing an unescaped slash, an attacker can inject arbitrary HTML or JavaScript content into a page rendered by the template. This flaw is classified as CWE‑79 and can compromise the integrity of client‑side content, allowing attackers to execute scripts in users’ browsers.

Affected Systems

Any Go application that utilizes the standard library package html/template may be affected. The CVE description does not list specific Go releases, so the exact affected versions are unknown. The fix for issue GO‑2026‑6091 is referenced in the advisory links.

Risk and Exploitability

The EPSS score is under 1 %, indicating a very low probability of exploitation as of now. The CVSS score of 6.1 reflects moderate severity, and the vulnerability is not listed in the CISA KEV catalog. An attacker would need to supply crafted input that reaches the html/template processor in a JavaScript context. If successful, arbitrary script injection could lead to credential theft, defacement, or other client‑side attacks.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a Go release that includes the fix for GO‑2026‑6091.
  • Sanitize or escape all untrusted input before it is rendered by the html/template package.
  • Apply a strong Content‑Security‑Policy to restrict script execution in client browsers.

Generated by OpenCVE AI on August 14, 2026 at 18:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-79
Type Values Removed Values Added
First Time appeared Go Standard Library
Go Standard Library html/template
Vendors & Products Go Standard Library
Go Standard Library html/template
Type Values Removed Values Added
Description Previously, pathological inputs could close an unescaped '/' early, allowing for attack-controlled data to inject arbitrary content, potentially leading to XSS.
Title Fix Javascript regexp context tracking in html/template
References
Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
Aug 14, 2026, 3:32 PM
Reserved
Jun 23, 2026, 3:10 PM
Status
Awaiting Analysis
Published
Aug 13, 2026, 10:17 PM
Modified
Sep 3, 2026, 4:37 PM
Severity
Important
Public date
Aug 13, 2026, 9:58 PM