REDHAT-BUG-2587951: Path Traversal
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 Software
Event History
Frequently Asked Questions
Which Hugo deployments are exposed?
Deployments using Hugo from 0.56.0 before 0.170.0 are affected when they build a site using a malicious theme or module. The files at risk are those accessible on the build host.
What does an attacker need to control to exploit this issue?
The attacker needs to supply a malicious theme or module with '..' segments in _vendor/modules.txt import paths. This can cause Hugo to treat an arbitrary directory as a module root.
What could be exposed in the generated site?
A malicious theme or module can use readFile or static mounts to publish arbitrary build-host files. This may include secrets, credentials, and system files.