GHSA-WCPJ-VCVM-J4PG
Stored XSS via unescaped heading ID in Table of Contents HTML
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-WCPJ-VCVM-J4PG divulgada | |
| Remediación | Parche v0.167.0 | github.com/gohugoio/hugo · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Impact
Explicit heading IDs in Markdown (e.g. `## Intro {id="..."}`) were written unescaped into the `href` of the generated Table of Contents HTML. A content author who controls Markdown can break out of the attribute and inject arbitrary HTML, including elements with event handlers, into any page that renders `.TableOfContents` or `.Fragments.ToHTML`.
This affects sites that build untrusted or third-party Markdown content and render a table of contents. The heading element itself was already escaped; only the ToC output was affected.
Affected versions
Hugo v0.60.0 (Goldmark as the default Markdown renderer) up to and including v0.166.0.
Patches
Fixed in v0.167.0 by escaping heading IDs before they are written to the ToC HTML.
Workarounds
Do not render `.TableOfContents` or `.Fragments.ToHTML` for untrusted content, or validate heading IDs in a content pipeline before building.
References
- CWE-79: Improper Neutralization of Input During Web Page Generation
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/gohugoio/hugo |
Corregida | v0.167.0 | 0 d | v0.170.0 no afectada |
v0.167.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/gohugoio/hugo/security/advisories/GHSA-wcpj-vcvm-j4pgLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
