Skip to content

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.

PackageAffectedFixed inStatus
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

ProductAffected versionsFixed 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