Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain contributor write access to site content
-
DeliverySubmit Markdown code fence with malicious lineAnchors value
-
ExploitHugo passes value to Chroma unescaped
-
ExecutionPayload rendered into published page id/href
-
ImpactVisitor loads page, arbitrary JS executes in browser
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires a Hugo site that builds and publishes Markdown from untrusted contributors - the attacker must be able to author or influence page content (a Markdown code fence with a crafted |
| Impact | This is a genuine but low-urgency issue. The vendor CVSS 4.0 score of 5.1 (MEDIUM) is consistent with the mechanism: a stored XSS that requires an authenticated/privileged content contributor (PR:L) and passive victim interaction (UI:P), yielding only subsequent-system impact (SC:L/SI:L) - i.e. script execution in site-visitor browsers, not compromise of the Hugo build host. No EPSS score, no CISA KEV listing, and no public POC were provided, so exploitation is: no public exploit identified at time of analysis. The dominant limiting factor is Hugo's own security model, which explicitly treats content as trusted input - meaning this only matters for sites that build and publish Markdown authored by untrusted contributors (e.g. multi-author docs sites, community wikis, PR-driven blogs). This is a real priority ONLY for such multi-contributor deployments; for the common single-author/trusted-source Hugo site it is effectively non-exploitable. No signals conflict: the CVSS 4.0 vector (network AV:N, low complexity, privileges required, passive UI) aligns cleanly with the description's stored-XSS-via-contributed-content narrative. |
| Exploit ScenarioDerived | A malicious or compromised contributor to a Hugo-built site (e.g. via a pull request or CMS entry) submits a Markdown code fence whose |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 26, 2026
Stored cross-site scripting in Hugo 0.75.0 through 0.165.x allows an authenticated contributor to inject arbitrary JavaScript into generated sites by supplying a crafted lineAnchors value in a Markdown code fence or a highlight template call. The syntax highlighter passes that value to Chroma without HTML-escaping it, so Chroma writes it verbatim into the id and href attributes of line-number markup, and a visitor who loads the rendered page can execute the injected script. Vendor-released patch: 0.166.0; no public exploit identified at time of analysis, and the independent assessment rates this as a genuine but low-urgency issue because exploitation requires contributor-level content access and relies on untrusted Markdown being published.
RemediationAI
Upgrade Hugo to 0.166.0 or later, which is the vendor-released patch that HTML-escapes the lineAnchors value before passing it to Chroma. If upgrading cannot be done immediately, reduce exposure by treating Markdown as untrusted: restrict contributor-level content access, strip or reject lineAnchors attributes from code fences and highlight template calls, disable line anchors/line numbers for untrusted content, and sanitize or post-process generated HTML before publishing. Trade-offs: disabling line anchors or syntax highlighting reduces site functionality; sanitizing output may alter legitimate markup; and limiting contributors can impede collaboration, so these are compensating controls rather than equivalent fixes. Advisory references: https://github.com/gohugoio/hugo/security/advisories/GHSA-q4xf-287f-98r8 and https://www.vulncheck.com/advisories/hugo-before-0.166.0-stored-xss-via-lineanchors-code-block-option.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-79 (improper neutralization of input during web page generation) in Hugo's syntax-highlighting path. Hugo uses Chroma to generate highlighted code blocks, and when line anchors or line numbers are enabled, the lineAnchors option controls the id/href values in the generated line-number markup; affected versions fail to escape that option before passing it to Chroma. Although the value is supplied by content (a Markdown code fence attribute or the highlight template function), Hugo's security model treats content as trusted input, so the vulnerability matters mainly for sites that build and publish Markdown from untrusted contributors. The CPE cpe:2.3:a:gohugoio:hugo:*:*:*:*:*:*:*:* covers Hugo, and EUVD-2026-87664 records affected versions as hugo 0.75.0 <0.166.0; the fix in 0.166.0 HTML-escapes lineAnchors before Chroma receives it.
Know when Hugo gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Contributor must supply content (PR:L) and a visitor must load the page (UI:R); XSS executes in the visitor's browser, a different security scope (S:C) with limited confidentiality/integrity impact and no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Hugo is a fast and Flexible Static Site Generator built in Go. Rated high severity (CVSS 8.5), this vulnerability is rem
Sandbox/permission-restriction bypass in the Hugo static site generator (versions after v0.43, fixed in v0.165.0) lets a
Arbitrary command execution in Hugo 0.162.0 through 0.164.x occurs when the static site generator builds a project whose
Arbitrary file disclosure in the Hugo static site generator (versions after v0.123.0 and before v0.165.0) lets an attack
Symlink-following flaws in Hugo's theme and module mount confinement allow files outside a project's mount roots to be r
Arbitrary file read in Hugo v0.161.0 through v0.165.0 allows an attacker who can contribute content to a Hugo project -
Case-sensitivity bypass in Hugo's security.http.urls IP-literal deny rule lets builds running v0.162.0 through v0.165.x
Server-side request forgery in Hugo static site generator (versions 0.91.0 through 0.165.0) allows an attacker who can s
Local file disclosure in Hugo v0.162.0 through v0.166.x allows an attacker-controlled theme or module to place a symlink
Path traversal in Hugo's asset pipeline lets a malicious theme or module bundle files from outside the project root into
Path traversal in Hugo's css.Sass transpilation pipeline (all versions before v0.167.0) lets a malicious theme or module
Symlink traversal in Hugo's virtual filesystem (v0.123.0-v0.163.0) allows a symlink planted inside a theme or local moun
EUVD-2026-87664
GHSA-8v94-8989-vc79
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB