Hugo's Node tool execution allows file system access outside the project directory
Package
Affected versions
>= 0.43.0, < 0.161.0
Patched versions
0.161.0
Description
Published to the GitHub Advisory Database
May 6, 2026
Reviewed
May 6, 2026
Published by the National Vulnerability Database
May 12, 2026
Last updated
May 13, 2026
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.
References