CVE-2026-58402: gohugo hugo Cross-site Scripting
Vulnerability summary
CVE-2026-58402 is a medium (CVSS 5.4) Cross-site Scripting vulnerability in gohugo hugo. EPSS estimates a 0.30% chance of exploitation in the next 30 days, higher than 21.4% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 1Timeline
- 06-07-2026PublishedVulnerability first disclosed.
- 06-07-2026Last 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- OSV · UbuntuEcosystem advisory · calculated5.1MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
- OSV · GoEcosystem advisory · calculated5.1MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
- NVDNIST5.1MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- OSV · DebianEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
0.30%
Chance of exploitation in the next 30 days
Percentile
21%
Versus all other CVEs
30-day change
0.00 pp
From 0.30% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
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- github.com/gohugoio/hugo/security/advisories/GHSA-q76j-gcg9-vxc6X Refsource CONFIRMREPORTWEBAdvisoryVendor Advisory
- github.com/gohugoio/hugo/commit/ce1a7e0bce3713af40496ded3c2c0ceeed49231dX Refsource MISCREPORTFIXPatch
- github.com/gohugoio/hugoPACKAGE