CVE-2026-100691

Hugo versions 0.75.0 through 0.165.x contain a stored cross-site scripting vulnerability: the syntax highlighter does not escape the `lineAnchors` option before passing it to Chroma, which writes the value verbatim into the `id` and `href` attributes of the generated line-number markup. A crafted `lineAnchors` value supplied as a Markdown code fence attribute (or passed to the `highlight` template function) results in unescaped HTML in the rendered page, allowing arbitrary JavaScript to execute in the browsers of visitors to the generated site. This affects sites that build and publish Markdown from untrusted contributors; Hugo's security model otherwise considers content trusted input. Fixed in 0.166.0, where the `lineAnchors` value is HTML-escaped before being passed to Chroma.
Configurations

Configuration 1 (hide)

cpe:2.3:a:gohugo:hugo:*:*:*:*:*:*:*:*

History

29 Sep 2026, 19:08

Type Values Removed Values Added
First Time Gohugo
Gohugo hugo
References () https://github.com/gohugoio/hugo/security/advisories/GHSA-q4xf-287f-98r8 - () https://github.com/gohugoio/hugo/security/advisories/GHSA-q4xf-287f-98r8 - Vendor Advisory
References () https://www.vulncheck.com/advisories/hugo-before-0.166.0-stored-xss-via-lineanchors-code-block-option - () https://www.vulncheck.com/advisories/hugo-before-0.166.0-stored-xss-via-lineanchors-code-block-option - Third Party Advisory
CPE cpe:2.3:a:gohugo:hugo:*:*:*:*:*:*:*:*

26 Sep 2026, 14:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-09-26 14:16

Updated : 2026-09-29 19:08


NVD link : CVE-2026-100691

Mitre link : CVE-2026-100691

CVE.ORG link : CVE-2026-100691


JSON object : View

Products Affected

gohugo

  • hugo
CWE
CWE-79

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')