CVE-2026-100691: Hugo - Stored XSS
- Cve: CVE-2026-100691
- Name: Hugo - Stored XSS
- Description: 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.
- Impact: Attackers can execute arbitrary JavaScript in site visitors' browsers, potentially leading to session hijacking or defacement.
- Remediation: Update to version 0.166.0 or later.
- Vulnerability type: stored_xss
- Vulnerability impact: stored_xss
- Requirement type: none
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 5.4
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Epss score: 0.00172
- Epss percentile: 0.0654
- Assignee: [email protected]
- Published at: 2026-09-26T14:16:53Z
- Age in days: 59
- Modified at: 2026-09-29T19:08:14Z
- Patch available: yes
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-100691
- Nvd status: analyzed
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/gohugoio/hugo/security/advisories/GHSA-q4xf-287f-98r8 | nvd | Vendor Advisory |
| https://www.vulncheck.com/advisories/hugo-before-0.166.0-stored-xss-via-lineanchors-code-block-option | nvd | Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| gohugo:hugo | >= 0.75.0, < 0.166.0 | no | nvd | /v1/products/gohugo/hugo |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| gohugoio/hugo | security_advisory | yes | /v1/repositories/gohugoio/hugo |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts