Skip to main content

Hugo EUVDEUVD-2026-41909

| CVE-2026-50133 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-16 https://github.com/gohugoio/hugo GHSA-c54g-xjwj-8g82
5.1
CVSS 4.0 · Vendor: https://github.com/gohugoio/hugo
View

Attack ChainAIDerived

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

  1. Access
    Gain write access to content pipeline (CMS editor or upstream API)
  2. Delivery
    Inject malicious HTML payload into text/html content file or adapter output
  3. Exploit
    Hugo renders content verbatim during site build
  4. Execution
    Stored XSS payload embedded in published site page
  5. Impact
    Victim 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.

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

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

Alert me

AnalysisAIv1 – 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

hugo < 0.162.0

Affected Packages

go github.com/gohugoio/hugo fix: 0.162.0
euvd hugo fix: 0.162.0

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

Vendor (https://github.com/gohugoio/hugo) PRIMARY 5.1 MEDIUM
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
vuln.today AI 4.4 MEDIUM

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.

3.1 AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:H/AT:P/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
SUSE 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Red Hat 6.1 MEDIUM

Primary rating from Vendor (https://github.com/gohugoio/hugo).

CVSS VectorVendor: https://github.com/gohugoio/hugo

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
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
CVSS changed
Jul 06, 2026 - 20:22 NVD
5.1 (MEDIUM)

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

toml
[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

EPSS Score
0.3%
Top 78% exploitable
Threat Intel
1
1 source
Data Quality
6 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.3%
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· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

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.

Vendor StatusVendor

SUSE

Severity: Moderate

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