GitHub Advisoryadvisory · Go

GHSA-x597-9fr4-5857 Hugo's Node tool execution allows file system access outside the project directory

MEDIUM Published 2026-05-06 Modified 2026-05-13 Official page ↗
Aliases
CVE-2026-44301
Ecosystem
Go
Packages
github.com/gohugoio/hugo
Severity
Moderate
CVSS vector
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
Weaknesses
CWE-22
Reviewed
2026-05-06

Affected packages

• Go github.com/gohugoio/hugo: >= 0.43.0, < 0.161.0 → fixed in 0.161.0

Description

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.

Related

Alias · CVE (1)

Weakness · CWE (1)

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness

References