5.4

CVE-2026-58402: Hugo default code block renderer XSS via unescaped code-fence language

Analyzed
AliasesUBUNTU-CVE-2026-58402DEBIAN-CVE-2026-58402GHSA-q76j-gcg9-vxc6
Published 06-07-2026Last modified 06-07-2026

Vulnerability summary

CVE-2026-58402 is a medium (CVSS 5.4) vulnerability in gohugo hugo. EPSS estimates a 0.17% chance of exploitation in the next 30 days, higher than 6.8% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 5.1, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.4/10
010
Medium · v3.1 (NVD)
EPSS score
0.17%
0%100%
Low · -0.13 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 1

Timeline

  1. 06-07-2026
    PublishedVulnerability first disclosed.
  2. 06-07-2026
    Last modifiedVulnerability information updated.

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.

CVSS metrics

7 scores · 5 sources · 2 versions

EPSS trend

Probability

0.17%

Chance of exploitation in the next 30 days

Percentile

7%

Versus all other CVEs

30-day change

Decrease -0.13 pp

From 0.30% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.

Debian1 product
  • hugoAll versions (No fix recorded) | < 0.165.0-1
Github.com/gohugoio1 product
  • hugo≥ 0.60.0, < 0.163.3
Gohugo1 product
  • hugo≥ 0.60.0, < 0.163.3
Gohugoio1 product
  • hugo≥ 0.60.0, < 0.163.3
Ubuntu1 product
  • hugoAll versions (No fix recorded)

5 vendors · 5 products

References

8 links