CVE-2026-10618: gohugo hugo Cross-site Scripting
Vulnerability summary
CVE-2026-10618 is a medium (CVSS 5.4) Cross-site Scripting vulnerability in gohugo hugo. EPSS estimates a 0.21% chance of exploitation in the next 30 days, higher than 11.2% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 1Timeline
- 24-08-2026PublishedVulnerability first disclosed.
- 26-08-2026Last modifiedVulnerability information updated.
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 metrics
7 scores · 4 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated4.8MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
- OSV · DebianEcosystem advisory · calculated4.8MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- NVDNIST4.8MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- NVDNIST5.4MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
0.21%
Chance of exploitation in the next 30 days
Percentile
11%
Versus all other CVEs
30-day change
0.00 pp
From 0.21% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Debian1 product
- hugoAll versions (No fix recorded) | < 0.166.0-1
Gohugo1 product
- hugo≥ 0.93.0, < 0.165.0
Gohugoio1 product
- hugo≥ 0.93.0, ≤ 0.165.0
Ubuntu1 product
- hugoAll versions (No fix recorded)
4 vendors · 4 products
References
8 links- github.com/gohugoio/hugoProduct
- github.com/gohugoio/hugo/blob/v0.165.0/markup/internal/attributes/attributes.goTechnical DescriptionProduct
- github.com/gohugoio/hugo/blob/v0.165.0/markup/goldmark/codeblocks/render.goTechnical DescriptionProduct
- www.vulncheck.com/advisories/…Third Party Advisory