Skip to main content

Hugo EUVDEUVD-2026-64776

| CVE-2026-10618 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-08-24 VulnCheck GHSA-2gp4-jcxx-7hpr
4.8
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain content-author repository access
  2. Delivery
    Craft malicious code-fence info string with quote-escape payload
  3. Exploit
    Commit Markdown file to site source
  4. Execution
    Hugo renders page with unescaped attribute value in HTML
  5. Persist
    Victim visits generated page
  6. Impact
    Event-handler JavaScript executes in victim's browser session

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the attacker hold low-privilege content-authoring access to the Hugo site's Markdown source - for example, repository write access or equivalent CMS contributor rights (CVSS PR:L). The victim must actively load the rendered HTML page in a browser (CVSS UI:A). Hugo's default configuration is sufficient: code fences must be enabled (which they are by default) and no custom render hook for code blocks must be present (custom hooks would replace the vulnerable renderer). Goldmark's unsafe mode is NOT required and is unrelated. The on* attribute name filter does NOT prevent exploitation because injection is achieved through the attribute value, not the name. Exploitation is limited by: (1) the requirement for content-author access, which confines the threat to insiders or supply-chain/credential compromise scenarios; (2) the requirement for a human victim to visit the affected page; and (3) impact is scoped to the visitor's browser session rather than the Hugo build infrastructure.

Impact

The CVSS 4.0 score of 4.8 (Medium) accurately reflects the real-world risk profile: network-accessible (AV:N), low complexity (AC:L), but gated behind low-privilege content-author access (PR:L) and requiring a victim to actively load the page (UI:A). The stored nature of the XSS elevates practical impact relative to reflected variants - a single malicious markdown commit persists and fires for every subsequent visitor without further attacker interaction, which means even a modestly trafficked site operated by a mid-sized team such as a municipal portal or SME publisher faces meaningful user-impact scope. No EPSS score was available in the provided data, and the vulnerability is absent from CISA KEV, so there is no confirmed evidence of active exploitation at time of analysis. The primary real-world limiting factor is the PR:L requirement: exploitability depends on a threat actor having content-authoring access (e.g., a malicious or compromised contributor), which narrows the attack surface compared to unauthenticated injection. The CVSS 4.0 subsequent-system metrics (SC:L/SI:L) correctly capture that the confidentiality and integrity impact falls on victims' browser sessions rather than the Hugo build infrastructure itself.

Exploit ScenarioDerived

An attacker with content-author access to a Hugo-based site (for example, a repository contributor or a compromised CI account) commits a Markdown file containing a fenced code block whose info string includes an attribute value with an embedded double-quote followed by an event handler, such as onclick=alert(document.cookie). Hugo processes the file and writes the unescaped string verbatim into the rendered HTML wrapper element. Every subsequent visitor who loads the generated page triggers the event handler and executes the injected JavaScript in their browser session.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 24, 2026

Stored cross-site scripting in Hugo's fenced-code-block renderer (versions 0.93.0 through 0.165.0) allows a low-privileged content author to inject arbitrary JavaScript into statically generated HTML pages by embedding crafted attribute values in a code-fence info string. The vulnerability arises because Hugo's markup/internal/attributes/attributes.go converts attribute values from byte slices to strings during storage, silently bypassing the escaping branch in RenderAttributes that only operates on byte slice types - contradicting the function's own documentation. Every visitor who loads an affected page executes the injected script; no public exploit identified at time of analysis, and exploitation has not been confirmed in CISA KEV.

RemediationAI

Upgrade Hugo to a version above 0.165.0 once a patched release is published by the Hugo project; monitor the upstream repository at https://github.com/gohugoio/hugo for release tags and the associated changelog. No exact fixed version number is confirmed in the available data - the upstream fix is identifiable in the source but a tagged release has not been independently verified. As an interim workaround, site operators can implement a custom render hook for code blocks that explicitly escapes attribute values before writing them to HTML output, preventing the vulnerable default renderer from being invoked; this requires authoring a layouts/_default/_markup/render-codeblock.html template. An alternative is to restrict content-authoring access to fully trusted contributors only, eliminating the PR:L threat actor class. Disabling code-fence attribute syntax entirely is not straightforward without a custom render hook, and the goldmark unsafe setting is unrelated and does not mitigate this issue. See the VulnCheck advisory at https://www.vulncheck.com/advisories/hugo-through-stored-cross-site-scripting-via-unescaped-code-fence-attribute-values for additional detail.

Affected VersionsENISA

hugo 0.93.0 ≤0.165.0

Affected Packages

euvd hugo no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Hugo (CPE: cpe:2.3:a:gohugoio:hugo:*:*:*:*:*:*:*:*) is a Go-based static site generator that uses the Goldmark Markdown processor for rendering. The vulnerable code path runs through the fenced-code-block pipeline: markup/goldmark/codeblocks/render.go and markup/highlight/highlight.go both invoke RenderAttributes in markup/internal/attributes/attributes.go. The root cause (CWE-79 - Improper Neutralization of Input During Web Page Generation) is a type-conversion bug: the New function stores attribute values as Go string types, but RenderAttributes escapes only values that remain as []byte. Because no value survives as a byte slice, the escaping branch is dead code and every attribute value is written verbatim into the HTML output. The existing on* attribute name filter is rendered irrelevant because the attack vector is the attribute value: a double-quote in the value terminates the current attribute and allows the attacker to append new attributes - including event handlers - to the wrapper element. This path is reachable under Hugo's default configuration with code fences enabled, without requiring goldmark's unsafe mode or any custom render hook.

Know when Hugo gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 4.8 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
vuln.today AI 5.4 MEDIUM

Stored XSS with scope change (S:C) to visitor browsers; PR:L for content-author prerequisite; UI:R for victim page load; no availability impact.

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:A/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N
SUSE MEDIUM
Red Hat 5.4 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Active
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

DescriptionCVE.org

Hugo's default fenced-code-block renderer writes attribute values taken from the code-fence info string into the rendered HTML without escaping them. New in markup/internal/attributes/attributes.go converts every attribute value from a byte slice to a string as it is stored, deliberately dropping the escaping that used to happen there, and RenderAttributes in the same file escapes only values that are still byte slices, so its escaping branch is never reached and every value is written verbatim. The function's documentation states that it performs HTML escaping of string attributes, which it does not. A quote inside an attribute value in the info string therefore terminates the attribute and allows a further attribute, including an event handler, to be placed on the wrapper element, and the script runs for every visitor who loads the page. This path is reached under the default configuration, with code fences enabled and without goldmark's unsafe setting or any custom render hook. Attribute names beginning with on are filtered when the attributes are parsed, so injection is achieved through the value rather than the name.

Threat Intelligence Overview

EPSS Score
0.2%
Top 88% exploitable
Prevalence
Medium
widely used static site generator, significant but not universal deployment
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

24
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +24
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

More in Hugo

View all
CVE-2020-26284 HIGH POC
8.5 Dec 21

Hugo is a fast and Flexible Static Site Generator built in Go. Rated high severity (CVSS 8.5), this vulnerability is rem

CVE-2026-89259 CRITICAL
9.3 Sep 11

Sandbox/permission-restriction bypass in the Hugo static site generator (versions after v0.43, fixed in v0.165.0) lets a

CVE-2026-75926 CRITICAL
9.3 Aug 18

Arbitrary command execution in Hugo 0.162.0 through 0.164.x occurs when the static site generator builds a project whose

CVE-2026-89258 CRITICAL
9.3 Sep 11

Arbitrary file disclosure in the Hugo static site generator (versions after v0.123.0 and before v0.165.0) lets an attack

CVE-2026-100692 HIGH
8.7 Sep 26

Symlink-following flaws in Hugo's theme and module mount confinement allow files outside a project's mount roots to be r

CVE-2026-100690 HIGH
8.7 Sep 26

Arbitrary file read in Hugo v0.161.0 through v0.165.0 allows an attacker who can contribute content to a Hugo project -

CVE-2026-100693 HIGH
8.6 Sep 26

Case-sensitivity bypass in Hugo's security.http.urls IP-literal deny rule lets builds running v0.162.0 through v0.165.x

CVE-2026-10582 HIGH
8.3 Aug 24

Server-side request forgery in Hugo static site generator (versions 0.91.0 through 0.165.0) allows an attacker who can s

CVE-2026-109596 MEDIUM
6.7 Oct 12

Local file disclosure in Hugo v0.162.0 through v0.166.x allows an attacker-controlled theme or module to place a symlink

CVE-2026-109595 MEDIUM
6.7 Oct 12

Path traversal in Hugo's asset pipeline lets a malicious theme or module bundle files from outside the project root into

CVE-2026-109574 MEDIUM
6.7 Oct 12

Path traversal in Hugo's css.Sass transpilation pipeline (all versions before v0.167.0) lets a malicious theme or module

CVE-2026-58403 MEDIUM
5.9 Jul 06

Symlink traversal in Hugo's virtual filesystem (v0.123.0-v0.163.0) allows a symlink planted inside a theme or local moun

Vendor StatusVendor

SUSE

Severity: Moderate

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