{"id":"CVE-2026-10618","url":"https://www.cyber-defence.io/tools/cve/CVE-2026-10618","generatedAt":"2026-10-28T03:38:22.785Z","title":"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.","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.","published":"2026-08-24T11:16:38.000Z","lastModified":"2026-10-12T15:10:00.000Z","status":"Analyzed","sourceIdentifier":"disclosure@vulncheck.com","cvss":{"version":"4.0","score":4.8,"severity":"MEDIUM","vector":"CVSS: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/M"},"cwe":["CWE-79"],"affected":["gohugo/hugo"],"epss":{"score":0.00302,"percentile":0.22768,"date":"2026-10-27","history":[]},"kev":{"listed":false},"exploits":{"count":0,"verified":false,"firstPublished":null,"source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[]},"verdict":{"level":"low","text":"Lower severity and a low EPSS score (0.30%). Track it; it rarely justifies an emergency change on its own."},"changes":[],"references":[{"url":"https://github.com/gohugoio/hugo","tags":["Product"],"source":"disclosure@vulncheck.com"},{"url":"https://github.com/gohugoio/hugo/blob/v0.165.0/markup/goldmark/codeblocks/render.go","tags":["Product"],"source":"disclosure@vulncheck.com"},{"url":"https://github.com/gohugoio/hugo/blob/v0.165.0/markup/highlight/highlight.go","tags":["Product"],"source":"disclosure@vulncheck.com"},{"url":"https://github.com/gohugoio/hugo/blob/v0.165.0/markup/internal/attributes/attributes.go","tags":["Product"],"source":"disclosure@vulncheck.com"},{"url":"https://www.vulncheck.com/advisories/hugo-through-stored-cross-site-scripting-via-unescaped-code-fence-attribute-values","tags":["Third Party Advisory"],"source":"disclosure@vulncheck.com"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-10618","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}