{"id":"CVE-2026-58402","published":"2026-07-06T19:19:58Z","modified":"2026-07-06T20:54:38Z","title":"Hugo default code block renderer XSS via unescaped code-fence language","vendor":"gohugoio","product":"hugo","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.1,"severity":"MEDIUM","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.003,"percentile":0.23315,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/gohugoio/hugo/security/advisories/GHSA-q76j-gcg9-vxc6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/gohugoio/hugo/pull/15051","tags":["x_refsource_MISC"]},{"url":"https://github.com/gohugoio/hugo/commit/ce1a7e0bce3713af40496ded3c2c0ceeed49231d","tags":["x_refsource_MISC"]},{"url":"https://github.com/gohugoio/hugo/releases/tag/v0.163.3","tags":["x_refsource_MISC"]}],"priority":{"score":8.2,"factors":[{"name":"EPSS percentile","points":4.66},{"name":"CVSS severity","points":3.57}]},"vendorSlug":"gohugoio","affectedVersions":[{"vendor":"gohugoio","product":"hugo","versions":[">= 0.60.0, < 0.163.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-06T20:52:58.622823Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/gohugoio/hugo","vulnerableRanges":[">=0.60.0, <0.163.3"],"patched":["0.163.3"],"from":["GO-2026-5569"],"provenance":"source"}],"summary":{"text":"Hugo, the static site generator, from 0.60.0 up to but not including 0.163.3, has a cross-site scripting flaw in its default code-block renderer, which writes the Markdown code-fence language or info-string into the generated code wrapper without HTML escaping. An attacker who can supply content with a crafted fence info-string can break out of the attribute and inject a live script element, which requires a user to take action such as viewing the affected page, and requires low privileges to submit the content.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:12:57Z"},"euvd":{"id":"EUVD-2026-41904","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-50135","published":"2026-07-06","fixed":"0.162.0","kev":false},{"cve":"CVE-2026-58403","published":"2026-07-06","fixed":"0.163.1","kev":false},{"cve":"CVE-2026-58404","published":"2026-07-06","fixed":"0.163.1","kev":false,"link":{"from":"CVE-2026-58404","to":"CVE-2026-58402","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/gohugoio/hugo","fromFixed":"0.163.1","toFixed":"0.163.3","daysApart":0}]}},{"cve":"CVE-2026-58402","published":"2026-07-06","fixed":"0.163.3","kev":false}],"package":"Go:github.com/gohugoio/hugo"}}