REDHAT-BUG-2497518: Medium severity Hugo Hugo vulnerability

Published Jul 6, 2026
·
Updated

Hugo is a static site generator. From 0.123.0 to 0.161.1, a regression made RootMappingFs.statRoot use Stat (follows symlinks) instead of Lstat , so a direct resources.Get of a symlink pointing outside its mount returned the target's contents — letting a symlink planted in a local mount (e.g. a vendored themes/ theme) read arbitrary files accessible to the Hugo user. Go-module themes from GitHub (symlinks stripped) and directory walks were unaffected. Fixed in 0.162.0.

Affected Software

1 affected component
Hugo Hugo>=0.123.0<=0.161.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 0.162.0

Event History

Jul 6, 2026
Data Sourced
via Red Hat·09:02 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which Hugo deployments are exposed to this issue?

Deployments using Hugo versions 0.123.0 through 0.161.1 are exposed when they process a local mount containing a planted symlink, such as a vendored theme. Go-module themes obtained from GitHub are not affected because symlinks are stripped.

2

What must an attacker control to exploit the issue?

An attacker must be able to plant a symlink in a local Hugo mount and have Hugo perform a direct resources.Get on that symlink. The symlink must point to a file outside the mount that is readable by the user running Hugo.

3

Are normal directory walks affected?

No. The issue affects direct resources.Get access to the symlink; directory walks were unaffected.

4

What is the remediation?

Upgrade Hugo to version 0.162.0, which contains the fix. If upgrading is not immediately possible, avoid processing untrusted local mounts or vendored themes that may contain symlinks, and ensure the Hugo process has access only to files it needs.

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