Servers and applications
CVE-2026-58403
Symlink confinement bypass in os.ReadFile
- Severity
- Medium
- Published
- 18 Jun 2026
- Last changed
- 2 Jul 2026
- Added to UpHeron
- 3 Nov 2026
- Fixed in
- 0.163.1
- Exploit chance
- 0.5% in the next 30 daysHigher than 41% of CVEs. EPSS by FIRST, 19 Nov 2026
- Also known as
- GHSA-c3wq-j5vh-68rc
- Sources
- Project advisories (GitHub)
Description
Affected versions: v0.123.0 through v0.163.0. Earlier versions are not affected. Fixed in: v0.163.1. Severity: Medium. Requires the attacker to be able to place (or convince a site author to place) a symlink inside a mounted directory — for example, inside a locally-vendored theme under themes/. Themes mounted as Go modules from GitHub have symlinks stripped on download and are not affected. Multi-directory walks (e.g. content/asset walking) were not affected either; only direct lookups via resources.Get followed symlinks.
Description. Hugo's virtual filesystem is designed so that files under a mount cannot reach outside the mount tree. A regression introduced in v0.123.0 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.
Affected software
| Software | Affected versions |
|---|---|
HugoServers and applications · github:gohugoio/hugo |
|
About Hugo
static site and RSS generator written in Go
- Share of all websites
- 0.1%W3Techs, Nov 2026
- GitHub stars
- 90,472GitHub, 15 Nov 2026
- Forks
- 8,450GitHub, 15 Nov 2026
- Latest release
- v0.170.0GitHub, 15 Nov 2026
- Released
- 13 Nov 2026GitHub
- Developer
- Bjorn Erik PedersenWikidata
- License
- Apache Software License 2.0Wikidata
- Written in
- GoWikidata
- First released
- 2013Wikidata
- First published on GitHub
- 4 Jul 2013GitHub
Vulnerabilities in Hugo
- In our list
- 29
- Published in the last 12 months
- 26
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- GHSA-4whp-jx7j-xvrmXSS via unescaped `wrapperClass` option in the `highlight` shortcodeMedium 13 Nov 2026
- GHSA-r48v-r4vw-h9v8Path traversal via `_vendor/modules.txt` lets themes/modules read arbitrary files on the build hostMedium 13 Nov 2026
- GHSA-r73q-gwx2-fpxmTheme-defined module.replacements bypass mount restrictions and widen the Node.js read sandboxMedium 13 Oct 2026
- CVE-2026-109597Hugo v0.60.0 before v0.167.0 Stored XSS via Table of Contents Heading IDsMedium 5.1 12 Oct 2026
- CVE-2026-109596Hugo from v0.162.0 before v0.167.0 Symlink File Disclosure via Nested Mount AncestorMedium 6.7 12 Oct 2026
- CVE-2026-109595Hugo v0.84.0 before v0.167.0 Path Traversal via js.Build ESBuild ResolverMedium 6.7 12 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-58403
- GitHub Advisory Database https://github.com/advisories/GHSA-c3wq-j5vh-68rc
- github.com https://github.com/gohugoio/hugo/security/advisories/GHSA-c3wq-j5vh-68rc