CVE-2026-58402

Hugo default code block renderer XSS via unescaped code-fence language

MEDIUM
5.4
CVSS Score
Published: July 6, 2026 at 07:19 PM UTC
Updated: October 25, 2026 at 08:10 PM UTC
2 products affected across 2 vendorsHugoHugo

Using hugo by gohugoio?

Get instant alerts when new vulnerabilities affect hugo - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.4
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

Description

Hugo is a static site generator. From 0.60.0 until 0.163.3, Hugo's default code-block renderer wrote the Markdown code-fence language or info-string into the code class="language-…" data-lang="…" wrapper without HTML escaping. A fence info-string containing a quote and a script payload breaks out of the attribute and injects a live script element. This issue is fixed in 0.163.3.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

0.60.0 ≤ v < 0.163.3
Affected range stops below 0.163.3, so it looks safe — our inference, not a vendor statement
Affected range stops below 0.163.3, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (4)

x_refsource_CONFIRMVendor Advisory
Source: cverecord
https://github.com/gohugoio/hugo/security/advisories/GHSA-q76j-gcg9-vxc6
x_refsource_MISCIssue Tracking
Source: cverecord
https://github.com/gohugoio/hugo/pull/15051
x_refsource_MISCRelease Notes
Source: cverecord
https://github.com/gohugoio/hugo/releases/tag/v0.163.3

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-79

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card