CVE-2026-10618

Published: Ago 24, 2026 Last Modified: Ago 24, 2026
ExploitDB:
Other exploit source:
Google Dorks:
MEDIUM 4,8
Attack Vector: network
Attack Complexity: low
Privileges Required: low
User Interaction: active
Confidentiality: N/A
Integrity: N/A
Availability: N/A
MEDIUM 5,4
Attack Vector: network
Attack Complexity: low
Privileges Required: low
User Interaction: required
Scope: changed
Confidentiality: low
Integrity: low
Availability: none

Description

AI Translation Available

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.

79

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Stable
Common Consequences
Security Scopes Affected:
Access Control Confidentiality Integrity Availability
Potential Impacts:
Bypass Protection Mechanism Read Application Data Execute Unauthorized Code Or Commands
Applicable Platforms
Technologies: AI/ML, Web Based, Web Server
View CWE Details
https://github.com/gohugoio/hugo
https://github.com/gohugoio/hugo/blob/v0.165.0/markup/goldmark/codeblocks/rende…
https://github.com/gohugoio/hugo/blob/v0.165.0/markup/highlight/highlight.go
https://github.com/gohugoio/hugo/blob/v0.165.0/markup/internal/attributes/attri…
https://www.vulncheck.com/advisories/hugo-through-stored-cross-site-scripting-v…