GHSA-797M-7J5G-3RPR
Symlinked mount roots in themes/modules could read files outside the module
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-797M-7J5G-3RPR divulgada | |
| Remediación | Parche v0.166.0 | github.com/gohugoio/hugo · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Impact
Hugo's symlink confinement checks stopped at the mount root itself. A theme or module checked into `themes/` could therefore contain a symlink at a mount root (for example `themes/mytheme/assets -> /some/dir/outside`), and files behind it were readable through `resources.Get`, `resources.Match` and similar functions, and could be published to `public/` via `static` mounts.
This bypassed the rule that theme and module mount sources must be local paths, which is part of Hugo's security model https://gohugo.io/about/security/: only the main project may access files outside the project root.
Modules fetched via Go modules are not affected, as Go module zips cannot contain symlinks. The main project could already mount absolute paths by configuration, so this is not an escalation there.
Patches
Fixed in v0.166.0. Symlinked mount roots, and symlinked directories between the mount root and the module directory, are now treated as non-existent for all modules, the main project included. Absolute mount sources in the main project continue to work.
Workarounds
Inspect `themes/` and vendored modules for symlinks at mount roots before building, or replace symlinks with explicit mounts.
References
- Related: GHSA-vrv5-r5rf-6v4j, GHSA-c3wq-j5vh-68rc, GHSA-fw87-fv5r-9fpw
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/gohugoio/hugo |
Corregida | v0.166.0 | 0 d | v0.170.0 no afectada |
v0.166.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-797m-7j5g-3rprLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
