SEPTEMBER 18, 2026
Live Feed
Back to database
Case File

CVE-2026-10618

MEDIUM · CVSS 5.4 EPSS 0.21% Public Exploit

Source: NVD + CISA KEV + EPSS · Published 2026-08-24 · Last synced 2026-09-18

CyberRota Analysis

AI-Generated

Hugo's default fenced-code-block renderer is vulnerable due to improper handling of attribute values from the code-fence info string, leading to potential HTML injection. This flaw allows attackers to inject malicious scripts into rendered HTML, which can execute in the browsers of users visiting the affected pages. Web developers and administrators using Hugo with default configurations should prioritize addressing this vulnerability to prevent exploitation.

Public Exploit Signal

A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.

Note: these links are listed for security research and verification purposes only.

CVE
CVE-2026-10618
Severity
MEDIUM
CVSS
5.4
EPSS
0.21%

Original NVD 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.