5.4Medium

CVE-2026-10618

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.

What this means for your business

  • An attacker can use it remotely, over a network, with an ordinary user login, but only after tricking someone into an action such as opening a file or a link.

What to do

  1. 1Ask your IT team or provider whether any of your systems use the affected product.
  2. 2If you do, follow the vendor's guidance. No patch reference has been published yet.

Not sure if your company is exposed?

Fastnexa’s certified penetration testers can check whether attackers could use this flaw, or others like it, against your websites, apps and network. The full test is free for our first 10 founding clients until 31 December 2026.

Scoring

CVSS
5.4 (v3.1)
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
CVSS v4
4.8
Weakness
CWE-79
Assigned by
disclosure@vulncheck.com

Dates

Published
2026-08-24
Last modified
2026-08-26
Sources
NVD

References