GHSA-6C8W-MPP8-9W47
Symlink in nested-mount ancestor directory of a theme exposes files outside the module
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-6C8W-MPP8-9W47 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
When a module mount is nested below another mount (e.g. `assets` and `assets/vendor/x`), Hugo enumerates the intermediate "virtual ancestor" directory (`assets/vendor`) by joining the path onto the parent mount and calling `Stat`, which follows symlinks. This path did not apply the symlink confinement rules used elsewhere in the root mapping filesystem.
A malicious or compromised theme/module can place a symlink (or NTFS junction) at that ancestor directory pointing outside its own root. Files from the link target are then listed by `resources.Match` and similar, and their content is readable during the build, so it can end up in the published output.
The attacker must control a theme/module used by the victim site. Impact is limited to local file disclosure during the build.
Affected versions
All versions up to and including v0.166.0. The affected code path dates back to v0.64.1; the symlink confinement it bypasses was introduced in v0.162.0 through v0.166.0.
Patches
Fixed in v0.167.0. The virtual-ancestor lookup now rejects entries that are symlinks or have a symlinked parent below the mount root, matching the existing rules for direct file access.
Workarounds
Do not use themes or modules from untrusted sources. Inspect vendored themes for symlinks or junctions in mounted directories before building.
References
- CWE-59: Improper Link Resolution Before File Access
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-6c8w-mpp8-9w47Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
