CVE-2026-58402 json
Hugo default code block renderer XSS via unescaped code-fence language
published 2026-06-19 4 mo ago modified 2026-10-25 14 d ago also EUVD-2026-41904 , GHSA-q76j-gcg9-vxc6 , GO-2026-5569 , JLSEC-2026-796
- cvss
- 5.4
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 22%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- go github.com/gohugoio/hugo 0.163.3
- julia Hugo_jll 0.163.3+0
- gohugo hugo 0.163.3
- hugo Debian 14 0.165.0-1
debian advisories DEBIAN-CVE-2026-58402
- hugo hummingbird 1 0.163.3-0.1.hum1
red hat advisories RHSA-2026:36862
- github.com/gohugoio/hugo@ce1a7e0 commit
- github.com/gohugoio/hugo#15051 pull request
- github.com/gohugoio/hugo/releases/tag/v0.163.3 release
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-58402 updated cvss 5.4
github.com/gohugoio/hugo: Hugo: Cross-site Scripting via unescaped code-fence language in default code block renderer
-
Red Hat Hardened Images hugo 0.163.3-0.1.hum1fixed: vendor fix RHSA-2026:36862
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 4 mo ago
Exploit prediction
0.30% chance of exploitation in the next 30 days, higher than 22% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 5.1 | 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 |
| CNA | 4.0 | 5.1 | 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/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 |
| NVD | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| OSV | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/gohugoio/hugo | >=0.60.0, <0.163.3 |
0.163.3 |
| julia | Hugo_jll | <0.163.3+0 |
0.163.3+0 |
Affected products
- gohugoio hugo
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/gohugoio/hugo/pull/15051
issue-tracking, web
-
github.com
/gohugoio/hugo/commit/ce1a7e0bce3713af40496ded3c2c0ceeed49231d
patch, web
-
github.com
/gohugoio/hugo/security/advisories/GHSA-q76j-gcg9-vxc6
web, vendor-advisory, advisory
-
github.com
/gohugoio/hugo/releases/tag/v0.163.3
release-notes, web
-
github.com
/gohugoio/hugo
package
Sources
- CVE List CVE-2026-58402
- GitHub Advisory GHSA-q76j-gcg9-vxc6
- NVD CVE-2026-58402
- OSV GO-2026-5569
- OSV JLSEC-2026-796
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.