CVE-2026-10618: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in gohugoio hugo
Description
CVE-2026-10618 is a medium severity cross-site scripting (XSS) vulnerability in the Hugo static site generator. The issue arises because Hugo's default fenced-code-block renderer improperly handles attribute values from code-fence info strings, writing them into HTML without proper escaping. This allows an attacker to inject malicious scripts via crafted attribute values, which execute when a user loads the affected page. The vulnerability affects Hugo versions from 0.93.0 through 0.165.0 under default configuration with code fences enabled. No official patch or fix information is provided in the available data.
CVSS v4.0
Score 4.8medium
Affected software
gohugoio
hugo
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Hugo's default fenced-code-block renderer converts attribute values from byte slices to strings without escaping, contrary to the function documentation. The RenderAttributes function only escapes byte slice values, which are not used after conversion, resulting in attribute values being written verbatim into HTML. This allows an attacker to inject a quote character inside an attribute value, terminating the attribute early and enabling injection of additional attributes such as event handlers. Attribute names starting with 'on' are filtered, so the injection occurs through the attribute value. This vulnerability is reachable under default Hugo settings with code fences enabled and without unsafe goldmark settings or custom render hooks.
Potential Impact
An attacker can inject malicious scripts into web pages generated by vulnerable Hugo versions, leading to cross-site scripting attacks. This can result in script execution in the context of users visiting the affected site, potentially compromising user data or session information. The CVSS 4.8 score reflects a medium severity with network attack vector, low privileges required, and user interaction needed.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should consider disabling code fences or using custom render hooks that properly escape attribute values. Avoid enabling unsafe goldmark settings that might exacerbate the issue. Monitor official Hugo project channels for updates and apply patches promptly once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-06-02T13:53:48.666Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a8c261eacd9273b496b635d
Added to database: 08/24/2026, 11:08:14 UTC
Last enriched: 09/10/2026, 22:47:59 UTC
Last updated: 10/08/2026, 06:48:15 UTC
Views: 76
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.
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.