Hugo 0.56.0 before 0.170.0 Path Traversal via _vendor/modules.txt
- CVE-2026-140395
- GHSA-r48v-r4vw-h9v8
- GHSA-rhmv-h4x2-hfcr
- EUVD-2026-140248
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.
Text from the CVE.org record.
Recommendation
gohugoio hugo
- If you run a version from 0.56.0 to before 0.170.0update to 0.170.0 or laterMajor version change: expect breaking changes
github.com/gohugoio/hugo
- If you run a version from 0.56.0 to before 0.170.0update to 0.170.0 or laterMajor version change: expect breaking changesgithub.com/gohugoio/hugo 0.170.0 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
gohugoio hugo
Affected versions Fixed in from 0.56.0 to before 0.170.0 0.170.0 github.com/gohugoio/hugoGo
Affected versions Fixed in from 0.56.0 to before 0.170.0 0.170.0
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.