Skip to content
OpenAdvisories
Medium · 5.9 CVE-2026-58403 EUVD-2026-41907GHSA-c3wq-j5vh-68rcGO-2026-5309

Hugo symlink confinement bypass in os.ReadFile

Published Jul 6, 2026 · Updated Jul 6, 2026 · Assigned by GitHub_M

Description

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 products

VendorProductAffectedFixed
gohugoio hugo >= 0.123.0, < 0.163.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 hugo 0.165.0-1 —
Debian 13 hugo No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 hugo No fix yet —
Ubuntu 26.04 LTS hugo No fix yet —
Ubuntu 25.10 hugo No fix yet —
Ubuntu 22.04 LTS hugo No fix yet —
Ubuntu 20.04 LTS hugo No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS hugo No fix yet —
Ubuntu 16.04 LTS hugo No fix yet —
Ubuntu Pro 24.04 LTS hugo No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 hugo 0.163.3-0.1.hum1 RHSA-2026:36862

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/gohugoio/hugo >= 0.123.0, < 0.163.1 0.163.1 GHSA-c3wq-j5vh-68rc

Advisories 1

References