CVE-2026-35166
MEDIUMVulnerability 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. |
| Impact | This is a moderate-to-high-priority vulnerability for Hugo deployments processing untrusted or user-contributed markdown content. CVSS vector data is unavailable, preventing calculation of a formal CVSS score, but the CWE-79 classification and XSS tag confirm the vulnerability class. The attack vector is network-accessible (markdown can be submitted via user input or pulled from external sources), requires low complexity (markdown syntax is trivial to craft), and requires no authentication-an attacker can inject malicious markdown and have it rendered to affected users. No EPSS data is provided, and no public exploit code or KEV (CISA Known Exploited Vulnerabilities) status is confirmed in the input. However, XSS vulnerabilities in web content renderers are routinely exploitable and prioritized. The primary mitigation factor is scope: vulnerability only affects sites using the default markdown renderer with untrusted content sources; sites using custom render hooks are explicitly unaffected. |
| Exploit ScenarioDerived | A site owner uses Hugo to publish a blog that accepts user comments or contributions in markdown format. An attacker submits a comment containing a markdown link with a javascript: URI or an image with an onerror event handler, e.g., |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 04, 2026
Cross-site scripting (XSS) vulnerability in Hugo's default markdown to HTML renderer fails to properly escape links and image links, allowing injection of malicious scripts through markdown content. Hugo v0.159.2 and earlier are affected. Users who employ custom render hooks for links and images, or who trust all markdown content sources, are not vulnerable. Vendor-released patch: v0.159.2.
RemediationAI
Vendor-released patch: Hugo v0.159.2 or later. Upgrade to v0.159.2 immediately via 'hugo version' to verify current installation, then update via your package manager or by downloading the latest release from github.com/gohugoio/hugo. Workaround (if immediate upgrade is not feasible): create custom render hooks for links and images in your Hugo theme or project to explicitly escape link and image URLs before rendering. Refer to the GitHub Security Advisory at https://github.com/gohugoio/hugo/security/advisories/GHSA-mcv8-8m8x-48pg and the patch commit at https://github.com/gohugoio/hugo/commit/479fe6c654937a850b65e74551dc4e857d52898f for implementation guidance.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in go
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Hugo is a static site generator written in Go that processes markdown content and renders it to HTML. The vulnerability resides in the default markdown rendering pipeline (CWE-79: Improper Neutralization of Input During Web Page Generation), where link href attributes and image src attributes derived from untrusted markdown input are not properly HTML-escaped before insertion into the output HTML. This allows an attacker to inject JavaScript or other executable content through specially crafted markdown syntax. The affected component is the core rendering engine for markdown-to-HTML conversion in the github.com/gohugoio/hugo package.
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:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
AV:N/AC:L/PR:L/UI:R/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
2DescriptionCVE.org
Impact
Links and image links in the default markdown to HTML renderer are not properly escaped. Hugo users who trust their Markdown content or have custom render hooks for links and images are not affected.
Patches
Patched in v0.159.2
Workarounds
Create custom render hooks for links and images in a Hugo theme/project.
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.
GHSA-mcv8-8m8x-48pg
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB