CVE-2026-100691
Received Received - Intake

Stored XSS in Hugo Static Site Generator

Vulnerability report for CVE-2026-100691, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-26

Last updated on: 2026-09-26

Assigner: 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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-26
Last Modified
2026-09-26
Generated
2026-09-26
AI Q&A
2026-09-26
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 4 associated CPEs
Vendor Product Version / Range
hugo hugo From 0.75.0 (inc) to 0.165.x (inc)
hugo hugo 0.166.0
gohugoio hugo From 0.75.0 (inc) to 0.165.x (inc)
gohugoio hugo 0.166.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a stored cross-site scripting (XSS) vulnerability in Hugo versions 0.75.0 through 0.165.x. The syntax highlighter fails to escape the lineAnchors option before passing it to Chroma, allowing unescaped HTML in line number markup. Attackers can inject malicious scripts via crafted Markdown code fence attributes.

Detection Guidance

Check Hugo version with 'hugo version'. If it is between 0.75.0 and 0.165.x, the system is vulnerable. Inspect Markdown files for code blocks with lineAnchors attributes containing untrusted input.

Impact Analysis

Visitors to sites using vulnerable Hugo versions may have arbitrary JavaScript executed in their browsers if the site includes untrusted Markdown content with malicious lineAnchors values. This could lead to session hijacking, data theft, or defacement of the rendered site.

Mitigation Strategies

Upgrade Hugo to version 0.166.0 or later. Avoid processing Markdown from untrusted sources until upgraded. If upgrading is not possible, disable syntax highlighting or sanitize lineAnchors values manually.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-100691. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart