Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain write access to content pipeline (CMS editor or upstream API)
-
DeliveryInject malicious HTML payload into text/html content file or adapter output
-
ExploitHugo renders content verbatim during site build
-
ExecutionStored XSS payload embedded in published site page
-
ImpactVictim visits page and executes attacker script 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 | Exploitation requires two concurrent conditions: first, the Hugo site must ingest content from a source that is not fully trusted - specifically a CMS-backed editor where non-admin users can contribute content, a content adapter configured to pull from an external API or third-party feed, or an automated import pipeline from an untrusted origin. Second, that untrusted content must be mapped to the text/html media type, either by placing .html files directly under /content or by a content adapter that explicitly sets content.mediaType = text/html. Exploitation is limited to stored XSS delivery to site visitors and requires a victim to visit the affected page (user interaction). Sites where every content file and every content adapter output is authored exclusively by fully trusted principals are not at risk regardless of Hugo version. Markdown, AsciiDoc, Org, Pandoc, and reStructuredText content files are unaffected regardless of configuration. No network-level access to the Hugo build environment is needed; the attack surface is entirely within the content authoring pipeline. |
| Impact | No official CVSS vector or score has been assigned by NVD, and no EPSS probability or CISA KEV listing is present in the available data - these are explicit gaps in the intelligence picture. The vendor advisory characterizes severity as Low to Medium depending on threat model, and this assessment is well-grounded: the vulnerability requires a specific deployment pattern (ingestion of HTML content from an untrusted source) to be exploitable. For sites where all content is authored by fully trusted parties, the risk is negligible. For sites using CMS-backed editing workflows with non-admin contributors, external content adapter pipelines, or automated HTML imports from third-party APIs, the risk rises substantially because those untrusted content paths are exactly the scenario where a stored XSS payload could reach all site visitors. No public proof-of-concept exploit has been identified, which slightly lowers urgency, but the attack concept is trivially straightforward - no novel techniques are required beyond injecting a script tag into an HTML content file. The absence of CVSS data means automated vulnerability management tooling will likely deprioritize this finding, which represents a real triage gap for affected organizations using those tools. |
| Exploit ScenarioDerived | An attacker with write access to a Hugo site's CMS or the ability to influence an upstream API consumed by a content adapter submits an HTML content file containing a malicious script payload (e.g., a credential-harvesting JavaScript snippet). When Hugo builds the site, it reads the content file, identifies it as text/html, and emits the body verbatim into the rendered page. Every subsequent visitor to that page executes the attacker's script in their browser, enabling session hijacking, credential theft, or malicious redirects without any interaction beyond visiting the compromised page. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 16, 2026
Stored cross-site scripting in Hugo's content pipeline affects all versions prior to v0.162.0 when the site ingests HTML content from untrusted sources. Hugo emitted the body of any content file mapped to the text/html media type verbatim into the rendered output, making sites backed by CMS editors, external content adapters, or automated import pipelines potential XSS delivery vehicles to end users. No public exploit code has been identified at time of analysis and the vulnerability is not listed in CISA KEV, but the risk is material for any Hugo deployment that does not fully trust every source populating the /content directory or content adapter pipeline.
RemediationAI
Upgrade Hugo to v0.162.0 or later, which is the vendor-confirmed fixed release (https://github.com/gohugoio/hugo/releases/tag/v0.162.0, patch commit e41a06447daa3071a01f333fdcec0a5153c3c8d1). After upgrading, text/html content is blocked by default with no further configuration required. Sites that intentionally serve raw HTML authored by fully trusted parties can opt back in by adding allowContent = ['.*'] under the [security] section in hugo.toml, but this re-enables the original behavior and should only be used when the entire content pipeline is trusted. If an immediate upgrade is not possible, the most effective compensating control is to audit and remove all .html files from the /content directory and disable any content adapters that set content.mediaType = text/html, thereby eliminating the vulnerable content paths. Alternatively, restricting write access to the content pipeline to fully trusted principals (removing CMS editor roles for untrusted contributors, auditing external API integrations) reduces the practical exploitability without modifying Hugo itself, though this carries operational trade-offs if those roles are needed for site workflows.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Hugo (pkg:go/github.com/gohugoio/hugo) is a Go-based static site generator that supports multiple markup formats including Markdown, AsciiDoc, Org, Pandoc, reStructuredText, and raw HTML. Content files are dispatched to format-specific converters based on their resolved MIME type. Prior to v0.162.0, content files resolving to the text/html media type - either .html files placed under /content or pages emitted by a content adapter that explicitly sets content.mediaType = text/html - bypassed any sanitization and had their body written verbatim into the rendered page. This constitutes a CWE-79 (Improper Neutralization of Input During Web Page Generation / Stored XSS) sink: malicious script tags or event handlers present in the raw HTML source are passed through unchanged into the final site output served to visitors. The fix in commit e41a06447d introduces a security.allowContent whitelist in config/security/securityConfig.go that defaults to denying text/html, enforced at page initialization in hugolib/page__meta.go via CheckAllowedContent() before content is processed.
Know when the next one hits your stack
- 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
AC:H because exploitation requires non-default untrusted HTML content ingestion; PR:L for required content contributor access; S:C for browser scope change; A:N as availability is unaffected.
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Primary rating from Vendor (https://github.com/gohugoio/hugo).
CVSS VectorVendor: https://github.com/gohugoio/hugo
Lifecycle Timeline
1DescriptionCVE.org
Commit: e41a06447d - _Disallow HTML content by default_ Affected versions: all Hugo versions prior to v0.162.0. Fixed in: v0.162.0. Severity: Low to Medium, depending on threat model. Not an issue if you fully trust every file under /content and every content adapter you load.
Description. Hugo accepts content files in several markup formats. Files mapped to the text/html media type (typically .html files under /content, or pages produced by a content adapter that sets content.mediaType = "text/html") had their body emitted verbatim into the rendered page. A site that ingests HTML content from an untrusted source - for example, a CMS-backed editor, a content adapter pulling from an external API, or an automated import pipeline - could therefore be served stored cross-site scripting.
Mitigation. v0.162.0 introduces a security.allowContent whitelist with text/html denied by default. Sites that intentionally author HTML content can opt back in:
[security]
allowContent = ['.*']This only affects pages whose source file (or content adapter output) declares an HTML media type; Markdown, AsciiDoc, Org, Pandoc and reStructuredText content is unaffected.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
EUVD-2026-41909
GHSA-c54g-xjwj-8g82
NVD
CVE.org
EPSS
Exploit-DB