6.2medium
Hugo: Node tool execution allows file system access outside the project directory
- Severity
- 6.2medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.27% (higher than 21% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-x597-9fr4-5857GO-2026-5740
Description
Hugo is a static site generator. From 0.43 to before 0.161.0, when building a Hugo site that uses Node-based asset pipelines (PostCSS, Babel, TailwindCSS), Hugo invoked the configured Node tools without restrictions on file system access. As a result, executing hugo against an untrusted site could allow code running through these tools to read or write files outside the project's working directory. Users who do not use PostCSS, Babel, or TailwindCSS, or who only build trusted sites, are not affected. This vulnerability is fixed in 0.161.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| gohugoio hugo | >= 0.43.0, < 0.161.0 | CVE List |
| github.com/gohugoio/hugo (Go) | from 0.43.0 before 0.161.0, before 0.161.0 | GitHub Advisory Database, Go Vulnerability Database |
| gohugo hugo | from 0.43 before 0.161.0 | NVD |
All scores
| GitHub_M | 6.2medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U |
| NVD | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
Hugo is a static site generator. From 0.43 to before 0.161.0, when building a Hugo site that uses Node-based asset pipelines (PostCSS, Babel, TailwindCSS), Hugo invoked the configured Node tools without restrictions on file system access. As a result, executing hugo against an untrusted site could allow code running through these tools to read or write files outside the project's working directory. Users who do not use PostCSS, Babel, or TailwindCSS, or who only build trusted sites, are not affected. This vulnerability is fixed in 0.161.0.
GitHub Advisory Database
Impact
When building a Hugo site that uses Node-based asset pipelines (PostCSS, Babel, TailwindCSS), Hugo invoked the configured Node tools without restrictions on file system access. As a result, executing hugo against an untrusted site could allow code running through these tools to read or write files outside the project's working directory.
Users who do not use PostCSS, Babel, or TailwindCSS, or who only build trusted sites, are not affected.
Patches
From v0.161.0, Hugo runs Node tools under Node's permission model with strict defaults: No write access and only read access to the site source directories and files.
Workarounds
Block these tools in security.exec.allow.
Go Vulnerability Database
Hugo's Node tool execution allows file system access outside the project directory in github.com/gohugoio/hugo
NVD (es)
Hugo es un generador de sitios estáticos. Desde la versión 0.43 hasta antes de la 0.161.0, al construir un sitio Hugo que utiliza pipelines de activos basados en Node (PostCSS, Babel, TailwindCSS), Hugo invocaba las herramientas de Node configuradas sin restricciones de acceso al sistema de archivos. Como resultado, ejecutar hugo contra un sitio no confiable podría permitir que el código que se ejecuta a través de estas herramientas lea o escriba archivos fuera del directorio de trabajo del proyecto. Los usuarios que no utilizan PostCSS, Babel o TailwindCSS, o que solo construyen sitios confiables, no se ven afectados. Esta vulnerabilidad está corregida en la versión 0.161.0.
References
| https://github.com/gohugoio/hugo/security/advisories/GHSA-x597-9fr4-5857 | advisory, mitigation, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-44301 | advisory | |
| https://github.com/gohugoio/hugo | package | |
| https://github.com/gohugoio/hugo/commit/a54c398b93821865547a9e21c73aad8a1d7f7bc1 | fix | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-44301 changed 2026-05-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-x597-9fr4-5857 changed 2026-07-24 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5740 changed 2026-07-24 | CC-BY-4.0 |
| NVD | CVE-2026-44301 changed 2026-10-26 | Public domain |