Severity by source
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
PR:L because Markdown write access is required; UI:R for victim page-load; S:C and C:L/I:L for browser-session XSS impact with no server-side effect.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
AnalysisAI
Stored XSS in Hugo's default code-block renderer allows an attacker with Markdown contribution rights to inject arbitrary JavaScript into generated static pages. Hugo versions 0.60.0 through 0.163.2 write the code-fence info-string (language identifier) directly into HTML attribute values without escaping, so a crafted info-string containing a quote character and script payload breaks out of the attribute context. No public exploit or KEV listing exists at time of analysis; the CVSS 4.0 score of 5.1 reflects the requirement for prior write access and victim interaction.
Technical ContextAI
Hugo (cpe:2.3:a:gohugoio:hugo:*:*:*:*:*:*:*:*) is a Go-based static site generator. Its default chroma code-block renderer generates HTML such as <code class="language-X" data-lang="X"> where X is the info-string immediately following the opening triple-backtick fence. From version 0.60.0 onward this string was interpolated into the attribute value without HTML entity encoding. CWE-79 (Improper Neutralization of Input During Web Page Generation / Cross-site Scripting) captures the root cause: a trust boundary is violated when Markdown authored by a less-trusted contributor is rendered into HTML without sanitizing attribute-context metacharacters. A payload such as `go" onload="alert(document.cookie) causes the double-quote to terminate the attribute value and the subsequent text to be parsed as a new event-handler attribute, effectively injecting a live script execution point into the static HTML output Hugo writes to disk.
RemediationAI
Upgrade Hugo to version 0.163.3, the vendor-released patch that introduces HTML escaping of code-fence info-strings before attribute interpolation (fix commit ce1a7e0bce3713af40496ded3c2c0ceeed49231d, pull request https://github.com/gohugoio/hugo/pull/15051). For sites that cannot upgrade immediately, the most effective compensating control is to restrict who can submit Markdown content - if all contributors are fully trusted, the attack surface disappears regardless of Hugo version. A secondary workaround is to override Hugo's default code-block render hook with a custom layout/shortcode that explicitly escapes the info-string using Hugo's htmlEscape function; this adds maintenance overhead but keeps the Hugo version frozen. Disabling syntax highlighting entirely (setting pygmentsCodeFences = false or removing chroma config) eliminates the vulnerable code path but at the cost of losing highlighted code blocks site-wide. No other known compensating control fully mitigates the issue without one of these trade-offs.
Hugo is a fast and Flexible Static Site Generator built in Go. Rated high severity (CVSS 8.5), this vulnerability is rem
Arbitrary command execution in Hugo 0.162.0 through 0.164.x occurs when the static site generator builds a project whose
Sandbox/permission-restriction bypass in the Hugo static site generator (versions after v0.43, fixed in v0.165.0) lets a
Arbitrary file disclosure in the Hugo static site generator (versions after v0.123.0 and before v0.165.0) lets an attack
Server-side request forgery in Hugo static site generator (versions 0.91.0 through 0.165.0) allows an attacker who can s
Symlink traversal in Hugo's virtual filesystem (v0.123.0-v0.163.0) allows a symlink planted inside a theme or local moun
Stored cross-site scripting in Hugo's fenced-code-block renderer (versions 0.93.0 through 0.165.0) allows a low-privileg
Build-time SSRF in Hugo static site generator (v0.162.0-v0.163.0) allows bypass of the `security.http.urls` IP-block pol
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allVendor StatusVendor
SUSE
Severity: ModerateShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-41904