Vulnerability · Published Jul 6, 2026 · Assigned by GitHub_M

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

Medium 5.9

In plain English

A medium-severity security flaw in hugo from gohugoio. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 41% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)5.9Medium
Exploit odds (30 days)0.5%top 58.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13hugono fix listedDEBIAN-CVE-2026-58403
Debian:14hugo0.165.0-1DEBIAN-CVE-2026-58403
Gogithub.com/gohugoio/hugo0.163.1GHSA-c3wq-j5vh-68rc
Gogithub.com/gohugoio/hugo0.163.1GO-2026-5309
Ubuntu:22.04:LTShugono fix listedUBUNTU-CVE-2026-58403
Ubuntu:25.10hugono fix listedUBUNTU-CVE-2026-58403
Ubuntu:26.04:LTShugono fix listedUBUNTU-CVE-2026-58403
Ubuntu:26.10hugono fix listedUBUNTU-CVE-2026-58403

Affected products (as reported)

VendorProductVersions
gohugoio hugo >= 0.123.0, < 0.163.1

Weakness: CWE-59 · Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

References