Description
Hugo from 0.56.0 before 0.170.0 contains a path traversal vulnerability that allows malicious themes or modules to read arbitrary build host files by supplying '..' segments in _vendor/modules.txt import paths. Attackers can make Hugo treat any directory as a module root and use readFile or static mounts to publish secrets, credentials, and system files in the generated site.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| gohugoio | hugo | 0.56.0 – < 0.170.0 | 0.170.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.
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Hardened Images 1 | hugo | 0.170.1-0.1.hum1 | RHSA-2026:104146 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Go | github.com/gohugoio/hugo | >= 0.56.0, < 0.170.0 | 0.170.0 | GHSA-r48v-r4vw-h9v8 |
Advisories 1
- RHSA-2026:104146 Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update Red Hat Security Advisories (RHSA) · Dec 2, 2026
References
- GitHub Security Advisory (GHSA-r48v-r4vw-h9v8) vendor-advisory
- VulnCheck Advisory: Hugo 0.56.0 before 0.170.0 Path Traversal via _vendor/modules.txt third-party-advisory