llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/gohugoio/hugo

GHSA-R4XX-89RF-5424

js.Build allowed themes to read files outside the project via ESBuild's fallback resolver

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición52 dDesde la divulgación, 28 sept 2026, 10:46 a. m.
Detección51 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche v0.167.0
Monitoreo
Detectada +1
28 sept 26
18 nov 26
19 nov 26
28 sept 26
11 oct 26
24 oct 26
6 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-R4XX-89RF-5424 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
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

Hugo's security model states that only the main project, not external components such as themes, can access files outside the project root. `js.Build`, `js.Batch` and `css.Build` hand imports that are not found in `/assets` over to ESBuild's own resolver, which reads directly from the file system with no notion of the project root and follows symlinks. A theme could ship a JavaScript file with `import secret from "../secret.txt"`, or a symlink pointing outside the project, and have the file content bundled into the published site.

Impact

A malicious theme or Hugo module can read any file readable by the build user and publish it as part of the site's JavaScript or CSS output. No user interaction beyond using the theme and running a build is required.

Patches

Fixed in v0.167.0. Files loaded by ESBuild outside of Hugo's virtual file system are now checked against the working directory and the paths in `security.node.permissions.allowRead`; anything that resolves outside these, including via symlinks, fails the build.

Workarounds

Do not use themes or modules you do not trust. Review imports in `js.Build`, `js.Batch` and `css.Build` entry points for paths that leave the project.

References
  • Hugo's Security Model https://gohugo.io/about/security/
  • `security.node.permissions.allowRead` https://gohugo.io/configuration/security/#nodepermissionsallowread

Thanks to @Hama1cco for finding and reporting this issue.

Versiones

Rangos afectados

Afectada Corregida Última
github.com/gohugoio/hugo≥ v0.84.0 < v0.167.0
v0.84.0
v0.167.0
v0.170.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogithub.com/gohugoio/hugo
Corregida v0.167.0 0 d v0.170.0 no afectada
Versiones corregidasv0.167.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/gohugoio/hugo/security/advisories/GHSA-r4xx-89rf-5424

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.