CVE-2026-44301
JSON

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 packageVersionsReported by
gohugoio hugo>= 0.43.0, < 0.161.0CVE List
github.com/gohugoio/hugo (Go)from 0.43.0 before 0.161.0, before 0.161.0GitHub Advisory Database, Go Vulnerability Database
gohugo hugofrom 0.43 before 0.161.0NVD

All scores

GitHub_M6.2medium CVSS:4.0CVSS: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
GitHubmedium CVSS:4.0CVSS: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
NVD8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Classification

CWE-22

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

Sources

SourceRecordLicence
CVE ListCVE-2026-44301 changed 2026-05-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-x597-9fr4-5857 changed 2026-07-24CC-BY-4.0
Go Vulnerability DatabaseGO-2026-5740 changed 2026-07-24CC-BY-4.0
NVDCVE-2026-44301 changed 2026-10-26Public domain