Back to CVE records
Medium 5.4Published Aug 24, 2026

CVE-2026-10618Hugo 0.93.0 through 0.165.0 Stored Cross-Site Scripting via Unescaped Code-Fence Attribute Values

Updated under an hour ago ()

Does this affect you?

It affects gohugoio hugo and 1 other product. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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
5.4 MEDIUM (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Weakness (CWE)
CWE-79
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
VulnCheck
NVD analysis
Analyzed
Record last updated
Aug 26, 2026
First seen by InfoSec Signals
Oct 9, 2026

Affected products

Affected products
gohugoio hugo
gohugoio:hugo (from the name)
from 0.93.0 through 0.165.0
CNA record
gohugo hugo
gohugo:hugo
from 0.93.0 before 0.165.0
NVD

References

  • product
  • technical-description, product
  • technical-description, product
  • technical-description, product
  • third-party-advisory

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.