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

GHSA-R73Q-GWX2-FPXM

Theme-defined module.replacements bypass mount restrictions and widen the Node.js read sandbox

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ón36 dDesde la divulgación, 13 oct 2026, 12:52 p. m.
Detección36 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.168.0
Monitoreo
Detectada +1
13 oct 26
18 nov 26
19 nov 26
13 oct 26
22 oct 26
1 nov 26
10 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-R73Q-GWX2-FPXM divulgada
Remediación Parche v0.168.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

A theme or module could define its own `module.replacements` and mount directories anywhere on the host.

Details

A theme or module could define its own `module.replacements`. If the project didn't set any replacements, Hugo applied the theme's replacements as if the project had set them. The theme could then import and mount a directory anywhere on the host, either by absolute path or by escaping `themesDir` with `../`. This got around the rule that theme mount sources must be local paths.

Mounting such a directory as `assets` also added it to the Node.js `--allow-fs-read` roots. That widened the `security.node.permissions` sandbox. For example, Node tools such as `css.PostCSS` could read files from that directory and load JavaScript modules from it.

Only sites that use an untrusted theme or module are affected.

Proof of concept

Create a theme as outlined in the Go test below:

func TestMountRestrictThemeReplacements(t *testing.T) {
    files := `
-- hugo.toml --
disableKinds = ["taxonomy", "term", "rss"]
theme = "mytheme"
-- themes/mytheme/hugo.toml --
[module]
replacements = "evil -> ../../secret"
[[module.imports]]
path = "evil"
[[module.imports.mounts]]
source = "."
target = "assets"
-- secret/file1.txt --
file1
-- layouts/all.html --
All.
`
    b, err := hugolib.TestE(t, files)
    b.Assert(err, qt.IsNotNil)
    b.Assert(err.Error(), qt.Contains, `module "evil" not found in "/themes/evil"`)
}
Impact

A theme could read file outside of its sandbox.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
github.com/gohugoio/hugo≥ 0.152.0 < v0.168.0
0.152.0
v0.168.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.168.0 0 d v0.170.0 no afectada
Versiones corregidasv0.168.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-r73q-gwx2-fpxm

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