CVE-2026-140395 Hugo 0.56.0 before 0.170.0 Path Traversal via _vendor/modules.txt
HighCVSS 8.7
EPSS 0.81%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: yes · technical impact: partial
- Technology
- UbuntuDebianRed Hat
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.
Upgrade path
7 packages: 3 fixed, 4 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/hugo(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/hugo(Ubuntu 24.04) | All versions | No fix listed | No fix yet |
| ubuntu/hugo(Ubuntu 26.04) | All versions | No fix listed | No fix yet |
| ubuntu/hugo(Ubuntu 26.10) | All versions | No fix listed | No fix yet |
| gohugoio github.com/gohugoio/hugo | >= 0.56.0, < 0.170.0 | 0.170.0 | Fixed |
| gohugoio github.com/gohugoio/hugo(Go) | >= 0.56.0, < 0.170.0 | 0.170.0 | Fixed |
| redhat/hugo-main(Red Hat hummingbird 1) | < 0.170.1-0.1.hum1 | 0.170.1-0.1.hum1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| gohugoio github.com/gohugoio/hugo(Go) | >= 0.56.0, < 0.170.0 | 0.170.0 |
| gohugoio github.com/gohugoio/hugo | >= 0.56.0, < 0.170.0 | 0.170.0 |
| redhat/hugo-main(Red Hat:hummingbird:1) | < 0.170.1-0.1.hum1 | 0.170.1-0.1.hum1 |
| ubuntu/hugo(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/hugo(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/hugo(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/hugo(Ubuntu:26.10) | All versions | No fix listed |
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
- ENISA EUVD EUVD-2026-140248 third-party-advisory
- nvd.nist.gov
- github.com
- github.com
- github.com product
- github.com
- Red Hat CVE page mitigation vendor-advisory
- Red Hat Bugzilla 2587951 issue-tracking
- www.cve.org
- RHSA-2026:104146 patch vendor-advisory
- Debian Security Tracker CVE-2026-140395 vendor-advisory
- Ubuntu CVE tracker vendor-advisory