Description
Hugo versions from v0.161.0 through v0.165.0 run Node.js tools (css.PostCSS, css.TailwindCSS, js.Babel) under the Node.js permission model to restrict file system reads to the project directory and configured mounts. Because the Node.js permission model validates only the lexical path and follows symbolic links that point outside the allowed set, Hugo did not detect symlinks escaping the sandbox. An attacker who can contribute content to a Hugo project (for example via a pull request) can commit a symlink such as assets/css/x.css -> /etc/passwd together with a PostCSS plugin that reads it, allowing any file readable by the Hugo build process to be disclosed and potentially embedded in the published site. This affects builds using the default security configuration; projects that do not invoke Node.js tools are unaffected. Fixed in v0.166.0, which scans allowed paths and fails the build when a symbolic link resolves outside them.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| gohugoio | hugo | 0.161.0 – < 0.166.0 | 0.166.0 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | hugo | 0.166.0-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | hugo | No fix yet | — |
| Ubuntu 26.04 LTS | hugo | No fix yet | — |
| Ubuntu 22.04 LTS | hugo | No fix yet | — |
| Ubuntu 20.04 LTS | hugo | No fix yet | — |
| Ubuntu 18.04 LTS | hugo | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | hugo | No fix yet | — |
| Ubuntu Pro 24.04 LTS | hugo | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Hardened Images 1 | hugo | 0.166.0-0.1.hum1 | RHSA-2026:66266 |
Advisories 1
- RHSA-2026:66266 Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update Red Hat Security Advisories (RHSA) · Oct 20, 2026
References
- GitHub Security Advisory (GHSA-x3mx-cm49-8m9c) vendor-advisory
- VulnCheck Advisory: Hugo v0.161.0 to v0.165.0 Arbitrary File Read via Symlinks third-party-advisory