Skip to main content

CVE-2026-35166

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-04-03 https://github.com/gohugoio/hugo GHSA-mcv8-8m8x-48pg
5.3
CVSS 4.0 · Vendor: https://github.com/gohugoio/hugo
View

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.

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., [click me](javascript:alert(1)) or ![](x onerror=alert(1)). When the default renderer processes this markdown without proper escaping, the generated HTML contains unescaped JavaScript, which executes in the browser of any visitor viewing that page, potentially stealing session cookies or performing actions on behalf of the victim. No public proof-of-concept code is noted in the input, but the XSS pattern is straightforward.

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

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

Alert me

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

go github.com/gohugoio/hugo fix: 0.159.2

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

Vendor (https://github.com/gohugoio/hugo) PRIMARY 5.3 MEDIUM
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
SUSE 4.6 MEDIUM
AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N
Red Hat 4.6 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
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

2
Patch released
Apr 04, 2026 - 00:30 nvd
Patch available
CVE Published
Apr 03, 2026 - 23:38 nvd
MEDIUM 5.3

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

EPSS Score
0.0%
Top 86% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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.0%
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.

Affected Products (CPE)CVE.org

pkg:go/github.com_gohugoio_hugo

Vendor StatusVendor

SUSE

Severity: Medium

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