github.com/gohugoio/hugo · Hugo: Build-host file disclosure through path traversal in vendored module metadata
Affects github.com/gohugoio/hugoSource GCVE Database
CVSS 6.7 Medium : upgrade to 0.170.0 when convenient.
Data as of 1 Dec 2026, 04:17 UTC
- Patch
- Available – fixed in 0.170.0
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:NWhat to do
Upgrade github.com/gohugoio/hugo to 0.170.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Gogithub.com/gohugoio/hugo | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in Hugo version 0.170.0, which rejects any non-local paths in _vendor/modules.txt, preventing path traversal. Users should upgrade to version 0.170.0 or later to remediate this vulnerability. Until upgraded, avoid building sites with untrusted themes or modules.
Description
A path traversal vulnerability in Hugo's vendored module handling allows a malicious theme to cause Hugo to read arbitrary files from the build host. This occurs because Hugo does not properly validate import paths in the _vendor/modules.txt file, enabling directory escapes outside the intended vendor directory. An attacker can exploit this by supplying a theme that references paths outside the project, causing sensitive files such as system or credential files to be read and included in the generated site.
References
- github.com/gohugoio/hugo/security/advisories/GHSA-r48v-r4vw-h9v8 (opens in a new tab)
- github.com/gohugoio/hugo/pull/15564 (opens in a new tab)
- github.com/gohugoio/hugo/commit/d41a8a196e6b2fd5e5aa886c790d6c679dd73be0 (opens in a new tab)
- github.com/gohugoio/hugo (opens in a new tab)
- github.com/gohugoio/hugo/releases/tag/v0.170.0 (opens in a new tab)