CVE-2026-100691
published medium CVSS 4.0 · 5.1Hugo before 0.166.0 Stored XSS via lineAnchors code block option
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| gohugoio | — | hugo0.75.0 to < 0.166.0 (affected · semver) · 0.166.0 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.1 / 10
- Severity
- medium
- Provider
- VulnCheck · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 5.4 | medium | VulnCheck · cna | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| gohugoio | hugo | 0.75.0 to < 0.166.0 (affected · semver)0.166.0 (unaffected · semver)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
2- GitHub Security Advisory (GHSA-q4xf-287f-98r8) https://github.com/gohugoio/hugo/security/advisories/GHSA-q4xf-287f-98r8
- VulnCheck Advisory: 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
Provider assertions
2VulnCheck · cna
Hugo before 0.166.0 Stored XSS via lineAnchors code block option
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- e07200dc5cab76052c2ac59d85a154cb4560953d1e017f55fc806737cb39edb1
- Ingested
- 30 Sep 2026, 15:17:34 UTC
- Source record
- Official CVE record