Description
Hugo from v0.60.0 before v0.167.0 contains a stored cross-site scripting vulnerability that allows Markdown content authors to inject HTML by supplying crafted explicit heading IDs. Attackers can break out of the unescaped href attribute in .TableOfContents or .Fragments.ToHTML output to inject elements with event handlers into rendered pages.
Published: 2026-10-12
Score: 5.1 Medium
EPSS: n/a
KEV: No
Impact: Stored Cross‑Site Scripting (XSS)
Action: Patch
AI Analysis

Impact

Hugo contains a flaw where Markdown authors can embed custom heading IDs into their content. The content parser then renders these IDs as part of the Table of Contents or fragment output without escaping the href attribute. By injecting malicious markup into the ID, an attacker can close the attribute and embed JavaScript or other elements, which will be served to any user who views the page. The resulting stored XSS can be used to steal credentials, manipulate the DOM, or redirect users, depending on the payload.

Affected Systems

The vulnerability applies to the gohugoio Hugo project, affecting releases starting with v0.60.0 and continuing through but excluding v0.167.0. All official binaries, Docker images, and source distributions that have not been upgraded beyond v0.167.0 contain the flaw.

Risk and Exploitability

The CVSS score of 5.1 reflects moderate risk, and an EPSS score is not available. The vulnerability is not listed in the CISA KEV catalog. Attackers would need the ability to supply or modify Markdown content, such as through a contributor portal or content editing interface. Once exploited, any user who views the rendered page is impacted, which can affect both anonymous visitors and authenticated users on sites that host user‑generated content.

Generated by OpenCVE AI on October 12, 2026 at 23:53 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Hugo to 0.167.0 or a newer release that fixes the issue.
  • Remove or sanitize any manually specified heading IDs in existing Markdown files to eliminate injected markup.
  • If an upgrade cannot be performed immediately, configure the site to automatically generate safe heading IDs and disable contributor‑supplied IDs to reduce the chance of injection.

Generated by OpenCVE AI on October 12, 2026 at 23:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 12 Oct 2026 22:45:00 +0000

Type Values Removed Values Added
Description Hugo from v0.60.0 before v0.167.0 contains a stored cross-site scripting vulnerability that allows Markdown content authors to inject HTML by supplying crafted explicit heading IDs. Attackers can break out of the unescaped href attribute in .TableOfContents or .Fragments.ToHTML output to inject elements with event handlers into rendered pages.
Title Hugo v0.60.0 before v0.167.0 Stored XSS via Table of Contents Heading IDs
First Time appeared Gohugo
Gohugo hugo
Weaknesses CWE-79
CPEs cpe:2.3:a:gohugo:hugo:*:*:*:*:*:*:*:*
Vendors & Products Gohugo
Gohugo hugo
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 5.1, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-12T22:21:51.941Z

Reserved: 2026-10-12T20:59:18.909Z

Link: CVE-2026-109597

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-12T23:17:23.183

Modified: 2026-10-12T23:17:23.183

Link: CVE-2026-109597

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-13T00:00:16Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')