Skip to main content

Hugo CVE-2026-109597

| EUVDEUVD-2026-98160 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-10-12 VulnCheck GHSA-hh58-7hgh-xf3r
5.1
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Obtain Markdown authoring access
  2. Delivery
    Submit heading with crafted explicit ID
  3. Exploit
    Break out of unescaped href in TOC/Fragments output
  4. Execution
    Store malicious markup in rendered page
  5. Impact
    Victim views page and JS executes in browser

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

Requires an attacker with Markdown content-authoring privileges (CVSS PR:L) who can supply crafted explicit heading IDs (e.g. a '{#...}' attribute block on a heading), on a Hugo site at version >= v0.60.0 and < v0.167.0 that renders the .TableOfContents or .Fragments.ToHTML output where the heading ID is placed into an unescaped href attribute. Exploitation is further limited by required victim interaction (UI:P - a user must view the rendered page) and by the deployment pattern: it is only relevant where Hugo processes Markdown from multiple or untrusted authors, not single-author sites built from a fully trusted source repository.

Impact

This is a moderate-severity stored XSS (CVSS 4.0 base 5.1, CWE-79) that in practice is a lower-priority issue than its 'network' attack vector might first suggest. The provided 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) is internally consistent with the description: PR:L reflects that the attacker must already be a privileged Markdown content author, UI:P reflects that a victim must view the rendered page, and the impact lands on the subsequent system (SC:L/SI:L - the victim's browser) with no impact to the Hugo build system itself (VC/VI/VA:N). There is no EPSS score, no CISA KEV listing, and no public POC referenced, so by the precision rules this is 'no public exploit identified at time of analysis.' The dominant mitigating factor is the PR:L prerequisite - exploitation is only meaningful where Hugo renders Markdown from multiple or semi-trusted authors (e.g. community docs, multi-contributor sites, or pipelines ingesting externally-supplied Markdown); a single-author blog built from a trusted repository is not realistically at risk. Net: a real but bounded defect, worth patching on multi-author deployments, not an emergency.

Exploit ScenarioDerived

On a Hugo site that accepts Markdown from multiple contributors (e.g. a community documentation portal), a malicious author submits a page whose heading uses a crafted explicit ID that breaks out of the unescaped href attribute generated by .TableOfContents or .Fragments.ToHTML. When another user or administrator views the rendered page, the injected element with an event handler executes attacker-controlled JavaScript in their browser. No public exploit code is referenced, but the technique is straightforward given the described attribute-breakout.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Oct 12, 2026

Stored cross-site scripting in the Hugo static site generator (versions v0.60.0 up to but not including v0.167.0) lets anyone holding Markdown content-authoring privileges break out of the href attribute generated for heading anchors by .TableOfContents or .Fragments.ToHTML and inject arbitrary HTML elements carrying event handlers into the rendered page. The issue is scored CVSS 4.0 base 5.1 (CWE-79) and requires low-privileged content access (PR:L) plus a victim viewing the poisoned page (UI:P); because the injected content is only dangerous when Hugo processes Markdown from multiple or untrusted authors, single-author sites built from a fully trusted repository are effectively not exposed. No public exploit code was identified at the time of analysis and the flaw has not been confirmed actively exploited (no CISA KEV listing), making this a moderate-priority hardening item rather than an urgent remote-code-execution-class emergency.

RemediationAI

Upgrade Hugo to v0.167.0 or later, which is the version boundary at which the affected range ends and the escaping of heading IDs in .TableOfContents and .Fragments.ToHTML output is corrected; rebuild and redeploy the site so previously generated HTML is regenerated with the fixed renderer (stale pre-built pages remain poisoned until that rebuild). If an immediate upgrade is not possible, the highest-value compensating control is to stop processing Markdown from untrusted or multi-tenant authors until the generator is patched, accepting the operational cost of restricting who can commit content or merging author submissions only through editorial review. A secondary mitigation is to post-process the generated HTML with a sanitizer (for example bluemonday for Go build pipelines or DOMPurify in a build step) before deployment, which strips event-handler attributes and injected elements regardless of Hugo version, at the cost of build-pipeline complexity and the risk of over-sanitizing legitimate theme markup. Deploying a Content Security Policy that omits 'unsafe-inline' for script-src and blocks inline event handlers will neutralize the practical impact in modern browsers, but it does not remove the injected markup, can break themes that rely on inline scripts, and depends on browser CSP support, so it should be treated as defense in depth rather than a fix. Sites that cannot upgrade and cannot sanitize output may temporarily avoid the vulnerable helpers, dropping .TableOfContents or .Fragments.ToHTML from templates, though this removes navigation features users depend on.

Affected VersionsENISA

hugo 0.60.0 <0.167.0

Affected Packages

euvd hugo fix: 0.167.0

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 is a Go-based static site generator that converts Markdown into HTML at build time; heading IDs can be set explicitly by authors using attribute blocks such as '{#custom-id}'. Two built-in template helpers, .TableOfContents and .Fragments.ToHTML, emit those heading IDs as fragments inside href attributes of anchor links. The vulnerability class is CWE-79 (improper neutralization of input during web page generation, i.e. cross-site scripting): the heading ID value was placed into the href attribute without escaping, so a crafted ID containing quote characters and markup terminates the attribute and introduces new elements such as an image or link with an onerror/onclick handler. The CPE cpe:2.3:a:gohugoio:hugo:*:*:*:*:*:*:*:* confirms the affected component is Hugo itself rather than a theme or downstream plugin, and the scope-changed CVSS 4.0 vector (SC:L/SI:L) reflects that the injected script executes in the context of pages generated by the site, not within Hugo's own build process. Modern Hugo uses the Goldmark Markdown renderer, whose heading-ID handling supports these explicit attribute blocks, which is why the vulnerable range begins at v0.60.0 (the release that standardized the current heading-ID behavior) and ends just before the fixed v0.167.0.

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 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
vuln.today AI 5.4 MEDIUM

Authenticated content author (PR:L), victim must render the page (UI:R), stored XSS executes in a different security context so S:C with low C/I impact and 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:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
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
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Oct 13, 2026 - 02:16 EUVD

DescriptionCVE.org

Hugo from v0.60.0 before v0.167.0 contains a stored cross-site scripting vulnerability that allows Markdown content authors to inject HTML by supplying crafted explicit heading IDs. Attackers can break out of the unescaped href attribute in .TableOfContents or .Fragments.ToHTML output to inject elements with event handlers into rendered pages.

Threat Intelligence Overview

EPSS Score
0.2%
Top 94% exploitable
Prevalence
Medium
very popular static site generator, but exploit needs multi-author content
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

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 Yes
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

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
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

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