CVE-2024-55601
JSON

5.3medium

Hugo does not escape some attributes in internal templates

Severity
5.3medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.60% (higher than 50% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-c2xf-9v2r-r2rxGO-2024-3314

Description

Hugo is a static site generator. Starting in version 0.123.0 and prior to version 0.139.4, some HTML attributes in Markdown in the internal templates listed below not escaped in internal render hooks. Those whoa re impacted are Hugo users who do not trust their Markdown content files and are using one or more of these templates: `_default/_markup/render-link.html` from `v0.123.0`; `_default/_markup/render-image.html` from `v0.123.0`; `_default/_markup/render-table.html` from `v0.134.0`; and/or `shortcodes/youtube.html` from `v0.125.0`. This issue is patched in v0.139.4. As a workaround, one may replace an affected component with user defined templates or disable the internal templates.

Affected

Product or packageVersionsReported by
gohugoio hugo>= 0.123.0, < 0.139.4CVE List
github.com/gohugoio/hugo (Go)from 0.123.0 before 0.139.4GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M5.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Hugo is a static site generator. Starting in version 0.123.0 and prior to version 0.139.4, some HTML attributes in Markdown in the internal templates listed below not escaped in internal render hooks. Those whoa re impacted are Hugo users who do not trust their Markdown content files and are using one or more of these templates: `_default/_markup/render-link.html` from `v0.123.0`; `_default/_markup/render-image.html` from `v0.123.0`; `_default/_markup/render-table.html` from `v0.134.0`; and/or `shortcodes/youtube.html` from `v0.125.0`. This issue is patched in v0.139.4. As a workaround, one may replace an affected component with user defined templates or disable the internal templates.

GitHub Advisory Database

Impact

Some HTML attributes in Markdown in the internal templates listed below not escaped. Impacted are Hugo users who do not trust their Markdown content files and are using one or more of these templates.

  • _default/_markup/render-link.html from v0.123.0
  • _default/_markup/render-image.html from v0.123.0
  • _default/_markup/render-table.html from v0.134.0
  • shortcodes/youtube.html from v0.125.0

Patches

Patched in v0.139.4.

Workarounds

Replace with user defined templates or disable the internal templates: https://gohugo.io/getting-started/configuration-markup/#renderhooksimageenabledefault

References

Go Vulnerability Database

Hugo does not escape some attributes in internal templates in github.com/gohugoio/hugo

NVD (es)

Hugo es un generador de sitios estáticos. A partir de la versión 0.123.0 y antes de la versión 0.139.4, algunos atributos HTML en Markdown en las plantillas internas que se enumeran a continuación no se escapaban en los ganchos de renderizado internos. Los afectados son los usuarios de Hugo que no confían en sus archivos de contenido Markdown y están usando una o más de estas plantillas: `_default/_markup/render-link.html` de `v0.123.0`; `_default/_markup/render-image.html` de `v0.123.0`; `_default/_markup/render-table.html` de `v0.134.0`; y/o `shortcodes/youtube.html` de `v0.125.0`. Este problema se solucionó en la versión v0.139.4. Como workaround, se puede reemplazar un componente afectado con plantillas definidas por el usuario o deshabilitar las plantillas internas.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-55601 changed 2024-12-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-c2xf-9v2r-r2rx changed 2024-12-10CC-BY-4.0
Go Vulnerability DatabaseGO-2024-3314 changed 2026-03-03CC-BY-4.0
NVDCVE-2024-55601 changed 2026-06-17Public domain