Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

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

0
Medium
VulnerabilityCVE-2026-10618cvecve-2026-10618
Published: 08/24/2026 (08/24/2026, 10:29:10 UTC)
Source: CVE Database V5
Vendor/Project: gohugoio
Product: hugo

Description

Hugo's default fenced-code-block renderer writes attribute values taken from the code-fence info string into the rendered HTML without escaping them. New in markup/internal/attributes/attributes.go converts every attribute value from a byte slice to a string as it is stored, deliberately dropping the escaping that used to happen there, and RenderAttributes in the same file escapes only values that are still byte slices, so its escaping branch is never reached and every value is written verbatim. The function's documentation states that it performs HTML escaping of string attributes, which it does not. A quote inside an attribute value in the info string therefore terminates the attribute and allows a further attribute, including an event handler, to be placed on the wrapper element, and the script runs for every visitor who loads the page. This path is reached under the default configuration, with code fences enabled and without goldmark's unsafe setting or any custom render hook. Attribute names beginning with on are filtered when the attributes are parsed, so injection is achieved through the value rather than the name.

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

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: 08/24/2026, 11:09:38 UTC

Technical Analysis

Hugo's default fenced-code-block renderer converts attribute values from code-fence info strings into strings without escaping them, contrary to the function documentation. The RenderAttributes function only escapes byte slice values, but since values are stored as strings, escaping is never applied. 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 on the wrapper element. The vulnerability is exploitable under default configuration with code fences enabled and without enabling goldmark's unsafe setting or custom render hooks. Attribute names starting with 'on' are filtered, so the injection vector is through attribute values rather than names.

Potential Impact

An attacker can inject malicious script code into pages generated by Hugo, which executes in the browsers of visitors loading the affected pages. This cross-site scripting vulnerability can lead to client-side code execution, potentially resulting in session hijacking, defacement, or other malicious actions depending on the context of the site. The impact is limited to sites using the vulnerable Hugo versions with default code fence rendering enabled.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, consider disabling fenced-code-block rendering or using custom render hooks to sanitize attribute values. Avoid enabling goldmark's unsafe setting unless necessary and with caution. Monitor official Hugo channels for updates addressing this vulnerability.

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
Remediation Level
null

Threat ID: 6a8c261eacd9273b496b635d

Added to database: 08/24/2026, 11:08:14 UTC

Last enriched: 08/24/2026, 11:09:38 UTC

Last updated: 08/24/2026, 13:38:23 UTC

Views: 5

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