5.4
MEDIUM CVSS 3.1
CVE-2026-10618
Hugo 0.93.0 through 0.165.0 Stored Cross-Site Scripting via Unescaped Code-Fence Attribute Values
Description

Hugo's default fenced-code-block renderer writes attribute values taken from the code-fence info string into the rendered HTML without escaping them. New in markup/internal/attributes/attributes.go converts every attribute value from a byte slice to a string as it is stored, deliberately dropping the escaping that used to happen there, and RenderAttributes in the same file escapes only values that are still byte slices, so its escaping branch is never reached and every value is written verbatim. The function's documentation states that it performs HTML escaping of string attributes, which it does not. A quote inside an attribute value in the info string therefore terminates the attribute and allows a further attribute, including an event handler, to be placed on the wrapper element, and the script runs for every visitor who loads the page. This path is reached under the default configuration, with code fences enabled and without goldmark's unsafe setting or any custom render hook. Attribute names beginning with on are filtered when the attributes are parsed, so injection is achieved through the value rather than the name.

INFO

Published Date :

Aug. 24, 2026, 11:16 a.m.

Last Modified :

Oct. 12, 2026, 3:10 p.m.

Remotely Exploit :

No
Affected Products

The following products are affected by CVE-2026-10618 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Gohugo hugo
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 134c704f-9b21-4f2e-91b3-4a467353bcc0
CVSS 3.1 MEDIUM 83251b91-4cc7-4094-a5c7-464a1b83ea10
CVSS 3.1 MEDIUM [email protected]
CVSS 3.1 MEDIUM MITRE-CVE
CVSS 4.0 MEDIUM 83251b91-4cc7-4094-a5c7-464a1b83ea10
CVSS 4.0 MEDIUM [email protected]
Solution
Update Hugo to a version that correctly escapes attribute values in fenced code blocks.
  • Update Hugo to the latest version.
  • Review code fence attribute handling.
  • Ensure HTML attribute values are escaped.
References to Advisories, Solutions, and Tools
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-10618 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-10618 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-10618 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-10618 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Translated by [email protected]

    Oct. 12, 2026

    Action Type Old Value New Value
    Added Translation Title: hugo de gohugoio, Description: El renderizador predeterminado de bloques de código vallados de Hugo escribe los valores de atributos tomados de la cadena de información de la valla de código en el HTML renderizado sin escaparlos. Lo nuevo en markup/internal/attributes/attributes.go convierte cada valor de atributo de un segmento de bytes a una cadena a medida que se almacena, eliminando deliberadamente el escape que solía ocurrir allí, y RenderAttributes en el mismo archivo escapa solo los valores que aún son segmentos de bytes, por lo que su rama de escape nunca se alcanza y cada valor se escribe textualmente. La documentación de la función establece que realiza el escape HTML de los atributos de cadena, lo cual no hace. Una comilla dentro de un valor de atributo en la cadena de información, por lo tanto, termina el atributo y permite que un atributo adicional, incluyendo un gestor de eventos, se coloque en el elemento contenedor, y el script se ejecuta para cada visitante que carga la página. Esta ruta se alcanza bajo la configuración predeterminada, con las vallas de código habilitadas y sin la configuración unsafe de goldmark ni ningún render hook personalizado. Los nombres de atributos que comienzan con on se filtran cuando se analizan los atributos, por lo que la inyección se logra a través del valor en lugar del nombre.
  • Initial Analysis by [email protected]

    Sep. 29, 2026

    Action Type Old Value New Value
    Added CPE Configuration OR *cpe:2.3:a:gohugo:hugo:*:*:*:*:*:*:*:* versions from (including) 0.93.0 up to (excluding) 0.165.0
    Added Reference Type VulnCheck: https://github.com/gohugoio/hugo Types: Product
    Added Reference Type VulnCheck: https://github.com/gohugoio/hugo/blob/v0.165.0/markup/goldmark/codeblocks/render.go Types: Product
    Added Reference Type VulnCheck: https://github.com/gohugoio/hugo/blob/v0.165.0/markup/highlight/highlight.go Types: Product
    Added Reference Type VulnCheck: https://github.com/gohugoio/hugo/blob/v0.165.0/markup/internal/attributes/attributes.go Types: Product
    Added Reference Type VulnCheck: https://www.vulncheck.com/advisories/hugo-through-stored-cross-site-scripting-via-unescaped-code-fence-attribute-values Types: Third Party Advisory
  • CVE Modified by [email protected]

    Aug. 26, 2026

    Action Type Old Value New Value
    Added Reference https://github.com/gohugoio/hugo
    Added Reference https://github.com/gohugoio/hugo/blob/v0.165.0/markup/goldmark/codeblocks/render.go
    Added Reference https://github.com/gohugoio/hugo/blob/v0.165.0/markup/highlight/highlight.go
    Added Reference https://github.com/gohugoio/hugo/blob/v0.165.0/markup/internal/attributes/attributes.go
    Added Reference https://www.vulncheck.com/advisories/hugo-through-stored-cross-site-scripting-via-unescaped-code-fence-attribute-values
    Removed Reference https://github.com/gohugoio/hugo
    Removed Reference https://github.com/gohugoio/hugo/blob/v0.165.0/markup/goldmark/codeblocks/render.go
    Removed Reference https://github.com/gohugoio/hugo/blob/v0.165.0/markup/highlight/highlight.go
    Removed Reference https://github.com/gohugoio/hugo/blob/v0.165.0/markup/internal/attributes/attributes.go
    Removed Reference https://www.vulncheck.com/advisories/hugo-through-stored-cross-site-scripting-via-unescaped-code-fence-attribute-values
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Aug. 26, 2026

    Action Type Old Value New Value
    Added SSVC {'id': 'CVE-2026-10618', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-08-26T18:20:48.410725Z'}
  • New CVE Received by [email protected]

    Aug. 24, 2026

    Action Type Old Value New Value
    Added Affected [{'vendor': 'gohugoio', 'product': 'hugo', 'versions': [{'status': 'affected', 'version': '0.93.0', 'versionType': 'semver', 'lessThanOrEqual': '0.165.0'}], 'collectionURL': 'https://github.com/gohugoio/hugo', 'defaultStatus': 'unaffected'}]
    Added Description Hugo's default fenced-code-block renderer writes attribute values taken from the code-fence info string into the rendered HTML without escaping them. New in markup/internal/attributes/attributes.go converts every attribute value from a byte slice to a string as it is stored, deliberately dropping the escaping that used to happen there, and RenderAttributes in the same file escapes only values that are still byte slices, so its escaping branch is never reached and every value is written verbatim. The function's documentation states that it performs HTML escaping of string attributes, which it does not. A quote inside an attribute value in the info string therefore terminates the attribute and allows a further attribute, including an event handler, to be placed on the wrapper element, and the script runs for every visitor who loads the page. This path is reached under the default configuration, with code fences enabled and without goldmark's unsafe setting or any custom render hook. Attribute names beginning with on are filtered when the attributes are parsed, so injection is achieved through the value rather than the name.
    Added CVSS V4.0 AV:N/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
    Added CVSS V3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
    Added CWE CWE-79
    Added Reference https://github.com/gohugoio/hugo
    Added Reference https://github.com/gohugoio/hugo/blob/v0.165.0/markup/goldmark/codeblocks/render.go
    Added Reference https://github.com/gohugoio/hugo/blob/v0.165.0/markup/highlight/highlight.go
    Added Reference https://github.com/gohugoio/hugo/blob/v0.165.0/markup/internal/attributes/attributes.go
    Added Reference https://www.vulncheck.com/advisories/hugo-through-stored-cross-site-scripting-via-unescaped-code-fence-attribute-values
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.