Skip to main content
EPSS 0.2%top 89%

CVE-2026-10618: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in gohugoio hugo

0
Medium
Published: 08/24/2026 (08/24/2026, 10:29:10 UTC)
Source: CVE Database V5
Vendor/Project: gohugoio
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Active
Vuln. Confidentiality
Low
Vuln. Integrity
Low
Vuln. Availability
None
Subsq. Confidentiality
Low
Subsq. Integrity
Low
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Affected software

gohugoio

hugo

Affected versions
>=0.93.0 <=0.165.0
GitHub Actionsmore threats →cve
hugo
pkg:github/hugo
Affected versions
>=0.93.0 <=0.165.0

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

AILast updated: 09/10/2026, 22:47:59 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses