XSS in Gohugo Hugo
CVE-2026-58402
- CVSS v3
- 5.4 Medium
- Public exploits
- None known
- EPSS
- 0.003 · 23.1th percentile
- Published
- 2026-07-06
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.
Vulnerability class: XSS (Cross-Site Scripting)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 5.4 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
- Attack Vector
- Network
AV:N - Attack Complexity
- Low
AC:L - Privileges Required
- Low
PR:L - User Interaction
- Required
UI:R - Scope
- Changed
S:C - Confidentiality
- Low
C:L - Integrity
- Low
I:L - Availability
- None
A:N
EPSS exploit prediction
EPSS 0.003, 23.1th percentile (last changed ); unchanged over 30 days. About EPSS.
Affected products
- Gohugo Hugo
- Gohugoio Hugo — versions >= 0.60.0, < 0.163.3
Weakness classification (CWE)
References
- https://github.com/gohugoio/hugo/security/advisories/GHSA-q76j-gcg9-vxc6 (Vendor Advisory)
- https://github.com/gohugoio/hugo/pull/15051 (Issue Tracking)
- https://github.com/gohugoio/hugo/commit/ce1a7e0bce3713af40496ded3c2c0ceeed49231d (Patch)
- https://github.com/gohugoio/hugo/releases/tag/v0.163.3 (Release Notes)