CVE-2026-58402CWE-79

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

Medium · published July 6, 2026

CVSS v4.0
5.1
EPSS
0%
Percentile
21.6
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v4.0
5.1 · MEDIUM
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
EPSS
0.00300 · 21.6th percentile
Weakness
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Published
2026-07-06T19:19Z
EPSS history
Timeline
  • 06 JUL 19:19Z
    Hugo default code block renderer XSS via unescaped code-fence language
    cvelistv5