CVE-2026-58403: Hugo symlink confinement bypass in os.ReadFile

Published Jul 6, 2026
·
Updated

Hugo is a static site generator. From v0.123.0 through v0.163.0, Hugo's virtual filesystem is designed so that files under a mount cannot reach outside the mount tree, but a regression caused RootMappingFs.statRoot to call Stat, which follows symlinks, instead of Lstat, so a direct os.ReadFile "somefile" where somefile was a symlink pointing outside the mount would return the target's contents. This effectively let a symlink planted inside a theme or local mount read arbitrary files reachable to the user running hugo. This issue is fixed in v0.163.1.

Affected Software

2 affected components
Hugo>=v0.123.0<=v0.163.0
gohugo Hugo>=0.123.0<0.163.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 v0.163.1

Event History

Jul 6, 2026
CVE Published
via MITRE·07:25 PM
Data Sourced
via MITRE·07:25 PM
DescriptionWeakness
Data Sourced
via NVD·08:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-58403?

The severity of CVE-2026-58403 is classified as medium with a CVSS score of 5.9.

2

How do I fix CVE-2026-58403?

To fix CVE-2026-58403, update Hugo to version 0.163.1 or later where this vulnerability has been addressed.

3

What are the risks associated with CVE-2026-58403?

CVE-2026-58403 poses a risk of symlink confinement bypass, potentially allowing access to files outside of the intended directory structure.

4

Which versions of Hugo are affected by CVE-2026-58403?

CVE-2026-58403 affects Hugo versions from 0.123.0 through 0.163.0.

5

What is the main issue with CVE-2026-58403?

The main issue with CVE-2026-58403 is a regression that causes the Stat function to follow symlinks, allowing unintended file access.

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