CVE-2026-35166: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in gohugoio hugo
A cross-site scripting (XSS) vulnerability exists in the Hugo static site generator versions from 0. 60. 0 up to but not including 0. 159. 2. The issue arises because links and image links in the default markdown to HTML renderer are not properly escaped, which could allow injection of malicious scripts. Users who only use trusted Markdown content or have custom render hooks for links and images are not affected. This vulnerability is fixed in version 0. 159. 2.
AI Analysis
Technical Summary
CVE-2026-35166 is a CWE-79 cross-site scripting vulnerability in the Hugo static site generator. Specifically, from versions 0.60.0 to before 0.159.2, the default markdown to HTML renderer does not properly escape links and image links, allowing potential injection of malicious scripts. This vulnerability affects users who process untrusted Markdown content without custom render hooks. The issue was addressed and fixed in Hugo version 0.159.2.
Potential Impact
Exploitation of this vulnerability could allow an attacker to inject and execute arbitrary scripts in the context of the generated web pages, potentially leading to client-side code execution when users view the affected content. However, users who only use trusted Markdown content or have implemented custom render hooks for links and images are not impacted. The CVSS score of 5.3 reflects a medium impact due to the potential for script injection without requiring privileges or authentication.
Mitigation Recommendations
Upgrade to Hugo version 0.159.2 or later, where this vulnerability is fixed. Users who only use trusted Markdown content or have custom render hooks for links and images are not affected and may not require immediate action. No other mitigation steps are indicated by the vendor advisory.
CVE-2026-35166: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in gohugoio hugo
Description
A cross-site scripting (XSS) vulnerability exists in the Hugo static site generator versions from 0. 60. 0 up to but not including 0. 159. 2. The issue arises because links and image links in the default markdown to HTML renderer are not properly escaped, which could allow injection of malicious scripts. Users who only use trusted Markdown content or have custom render hooks for links and images are not affected. This vulnerability is fixed in version 0. 159. 2.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-35166 is a CWE-79 cross-site scripting vulnerability in the Hugo static site generator. Specifically, from versions 0.60.0 to before 0.159.2, the default markdown to HTML renderer does not properly escape links and image links, allowing potential injection of malicious scripts. This vulnerability affects users who process untrusted Markdown content without custom render hooks. The issue was addressed and fixed in Hugo version 0.159.2.
Potential Impact
Exploitation of this vulnerability could allow an attacker to inject and execute arbitrary scripts in the context of the generated web pages, potentially leading to client-side code execution when users view the affected content. However, users who only use trusted Markdown content or have implemented custom render hooks for links and images are not impacted. The CVSS score of 5.3 reflects a medium impact due to the potential for script injection without requiring privileges or authentication.
Mitigation Recommendations
Upgrade to Hugo version 0.159.2 or later, where this vulnerability is fixed. Users who only use trusted Markdown content or have custom render hooks for links and images are not affected and may not require immediate action. No other mitigation steps are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-01T17:26:21.133Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69d3f4be0a160ebd92ce2ef1
Added to database: 4/6/2026, 6:00:30 PM
Last enriched: 4/6/2026, 6:16:06 PM
Last updated: 4/6/2026, 7:51:20 PM
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.