CVE-2026-58402
MEDIUM 5.1CVSS 4.0Hugo: XSS via unescaped code-fence language in default code block renderer
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.
- Published
- 6 Jul 2026
- Last modified
- 25 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- GHSA-q76j-gcg9-vxc6GO-2026-5569
- Sources
- NVDJSONOSV GHSA-q76j-gcg9-vxc6JSONOSV GO-2026-5569JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 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 |
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | gohugo | hugocpe:2.3:a:gohugo:hugo:*:*:*:*:*:*:*:* |
>= 0.60.0, < 0.163.3 | 0.163.3 |
| OSV | Go | github.com/gohugoio/hugo | >= 0.60.0, < 0.163.3 | 0.163.3 |
References
- https://github.com/gohugoio/hugo/commit/ce1a7e0bce3713af40496ded3c2c0ceeed49231d · Patch, FIX
- https://github.com/gohugoio/hugo/pull/15051 · Issue Tracking
- https://github.com/gohugoio/hugo/releases/tag/v0.163.3 · Release Notes
- https://github.com/gohugoio/hugo/security/advisories/GHSA-q76j-gcg9-vxc6 · Vendor Advisory, WEB, ADVISORY
- https://github.com/gohugoio/hugo · PACKAGE
History
- 25 Nov 2026 21:03 UTC · NVD: first stored (published 6 Jul 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 24 Jul 2026)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 19 Jun 2026)