REDHAT-BUG-2587951: Path Traversal

Published Dec 1, 2026
·
Updated

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

1 affected component
Hugo Hugo>=0.56.0<0.170.0

Event History

Dec 1, 2026
Data Sourced
via Red Hat·02:44 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

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.

2

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.

3

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203