CVE-2026-58403
published medium CVSS 4.0 · 5.9Hugo symlink confinement bypass in os.ReadFile
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| gohugoio | — | hugo>= 0.123.0, < 0.163.1 | Affected | Not stated | 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.9 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| gohugoio | hugo | >= 0.123.0, < 0.163.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-59 CWE-59: Improper Link Resolution Before File Access ('Link Following')
References
4Provider assertions
2GitHub_M · cna
Hugo symlink confinement bypass in os.ReadFile
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- da7fecf87a675eb7a53331680780ee5a46f1afa4f78920e6b13f15acb56d3ee3
- Ingested
- 23 Sep 2026, 09:22:29 UTC
- Source record
- Official CVE record