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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | hugo | no fix listed | DEBIAN-CVE-2026-58403 |
| Debian:14 | hugo | 0.165.0-1 | DEBIAN-CVE-2026-58403 |
| Go | github.com/gohugoio/hugo | 0.163.1 | GHSA-c3wq-j5vh-68rc |
| Go | github.com/gohugoio/hugo | 0.163.1 | GO-2026-5309 |
| Ubuntu:22.04:LTS | hugo | no fix listed | UBUNTU-CVE-2026-58403 |
| Ubuntu:25.10 | hugo | no fix listed | UBUNTU-CVE-2026-58403 |
| Ubuntu:26.04:LTS | hugo | no fix listed | UBUNTU-CVE-2026-58403 |
| Ubuntu:26.10 | hugo | no fix listed | UBUNTU-CVE-2026-58403 |
Affected products (as reported)
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
- https://github.com/gohugoio/hugo/security/advisories/GHSA-c3wq-j5vh-68rc x_refsource_CONFIRM
- https://github.com/gohugoio/hugo/pull/15020 x_refsource_MISC
- https://github.com/gohugoio/hugo/commit/cf9c8f93ca2a2838ce378f9e36d052ac2f79e229 x_refsource_MISC
- https://github.com/gohugoio/hugo/releases/tag/v0.163.1 x_refsource_MISC