GHSA-c3wq-j5vh-68rc: Hugo: Symlink confinement bypass in os.ReadFile
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.
Published Jun 19, 2026
Affected packages
github.com/gohugoio/hugo
- Ecosystem
- Go
- Affected
- >= 0.123.0, < 0.163.1
- Fixed in
- 0.163.1
- Check
go list -m github.com/gohugoio/hugo
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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. This effectively let a symlink planted inside a theme or local mount read arbitrary files reachable to the user running hugo.
Credited to vnth4nhnt.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesGHSA-q76j-gcg9-vxc6
Hugo: XSS via unescaped code-fence language in default code block renderer
medium5.1Jun 19, 2026GHSA-r46f-3rpw-hxrv
Hugo: security.http.urls deny rules bypassed by alternate IPv4 encodings (SSRF)
high7.7Jun 19, 2026CVE-2026-50133
Hugo: XSS via text/html content files
medium5.1Jun 16, 2026CVE-2026-50134
Hugo: security.http.urls allow-list bypass via HTTP redirects
mediumJun 16, 2026CVE-2026-50135
Hugo: Symlink confinement bypass in resources.Get
medium6.9Jun 16, 2026CVE-2026-44301
Hugo's Node tool execution allows file system access outside the project directory
medium6.2May 6, 2026
