Skip to main content

Hugo EUVDEUVD-2026-87664

| CVE-2026-100691 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-09-26 VulnCheck GHSA-8v94-8989-vc79
5.1
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain contributor write access to site content
  2. Delivery
    Submit Markdown code fence with malicious lineAnchors value
  3. Exploit
    Hugo passes value to Chroma unescaped
  4. Execution
    Payload rendered into published page id/href
  5. Impact
    Visitor 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 lineAnchors attribute, or a call to the highlight template function with an attacker-controlled lineAnchors value). Affected versions are 0.75.0 through 0.165.x with the syntax highlighter (Chroma-backed code highlighting with line numbers/line anchors) in use. Exploitation is limited by: the need for contributor-level content access (CVSS PR:L), passive victim interaction (a visitor must load the rendered page, UI:P), and Hugo's security model which treats content as trusted - so single-author or fully-trusted-source sites are not realistically at risk. Impact is confined to visitors' browsers (subsequent-system SC:L/SI:L); the build host and Hugo process itself are not compromised.

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 lineAnchors attribute contains an HTML/JavaScript payload; because Hugo passes it to Chroma unescaped, it lands verbatim in the line-number markup's id/href attributes. When the site is rebuilt and published, any visitor who loads the affected page executes the attacker's JavaScript in their browser. No public exploit code is identified, but the technique is straightforward for anyone who can influence page content.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

hugo 0.75.0 <0.166.0

Affected Packages

euvd hugo fix: 0.166.0

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

Vendor (VulnCheck) PRIMARY 5.1 MEDIUM
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
vuln.today AI 5.4 MEDIUM

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.

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Red Hat 5.4 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Sep 26, 2026 - 14:02 EUVD
CVE Published
Sep 26, 2026 - 13:23 cve.org
MEDIUM 5.1

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

EPSS Score
0.2%
Top 95% exploitable
Prevalence
High
Hugo is one of the most widely deployed Go static-site generators
Data Quality
7 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

More in Hugo

View all
CVE-2020-26284 HIGH POC
8.5 Dec 21

Hugo is a fast and Flexible Static Site Generator built in Go. Rated high severity (CVSS 8.5), this vulnerability is rem

CVE-2026-89259 CRITICAL
9.3 Sep 11

Sandbox/permission-restriction bypass in the Hugo static site generator (versions after v0.43, fixed in v0.165.0) lets a

CVE-2026-75926 CRITICAL
9.3 Aug 18

Arbitrary command execution in Hugo 0.162.0 through 0.164.x occurs when the static site generator builds a project whose

CVE-2026-89258 CRITICAL
9.3 Sep 11

Arbitrary file disclosure in the Hugo static site generator (versions after v0.123.0 and before v0.165.0) lets an attack

CVE-2026-100692 HIGH
8.7 Sep 26

Symlink-following flaws in Hugo's theme and module mount confinement allow files outside a project's mount roots to be r

CVE-2026-100690 HIGH
8.7 Sep 26

Arbitrary file read in Hugo v0.161.0 through v0.165.0 allows an attacker who can contribute content to a Hugo project -

CVE-2026-100693 HIGH
8.6 Sep 26

Case-sensitivity bypass in Hugo's security.http.urls IP-literal deny rule lets builds running v0.162.0 through v0.165.x

CVE-2026-10582 HIGH
8.3 Aug 24

Server-side request forgery in Hugo static site generator (versions 0.91.0 through 0.165.0) allows an attacker who can s

CVE-2026-109596 MEDIUM
6.7 Oct 12

Local file disclosure in Hugo v0.162.0 through v0.166.x allows an attacker-controlled theme or module to place a symlink

CVE-2026-109595 MEDIUM
6.7 Oct 12

Path traversal in Hugo's asset pipeline lets a malicious theme or module bundle files from outside the project root into

CVE-2026-109574 MEDIUM
6.7 Oct 12

Path traversal in Hugo's css.Sass transpilation pipeline (all versions before v0.167.0) lets a malicious theme or module

CVE-2026-58403 MEDIUM
5.9 Jul 06

Symlink traversal in Hugo's virtual filesystem (v0.123.0-v0.163.0) allows a symlink planted inside a theme or local moun

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy