{"id":"GHSA-fw87-fv5r-9fpw","revision":"a0bf06e35ec7419db14f7946b0dc08f0","records":[{"revision":"a0bf06e35ec7419db14f7946b0dc08f0","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-fw87-fv5r-9fpw","aliases":["CVE-2026-50135","GO-2026-5380"],"title":"Hugo: Symlink confinement bypass in resources.Get","description":"**Commit:** [f8b5fa09a6](https://github.com/gohugoio/hugo/commit/f8b5fa09a6) — _Fix prevention of direct symlink reads in resources.Get_\n**Affected versions:** v0.123.0 through v0.161.1. Earlier versions are not affected.\n**Fixed in:** v0.162.0.\n**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.\n\n**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 `resources.Get \"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`.\n\n**Mitigation.** v0.162.0 calls `LstatIfPossible` and rejects symlinked entries with `os.ErrNotExist`, matching the behaviour of pre-v0.123.0 releases and of the directory-walking code paths.","state":0,"publishedAt":"2026-06-16T20:12:34+00:00","modifiedAt":"2026-07-07T20:41:13.6563147+00:00","affected":[{"ecosystem":"Go","name":"github.com/gohugoio/hugo","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.123.0"},{"kind":"fixed","version":"0.162.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/gohugoio/hugo/security/advisories/GHSA-fw87-fv5r-9fpw","https://github.com/gohugoio/hugo/commit/f8b5fa09a64950c32b803821ede411ebfe772b7a","https://github.com/gohugoio/hugo","https://github.com/gohugoio/hugo/releases/tag/v0.162.0"],"sourceUrl":"https://github.com/advisories/GHSA-fw87-fv5r-9fpw","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-fw87-fv5r-9fpw","identifiers":["GHSA-fw87-fv5r-9fpw","CVE-2026-50135","GO-2026-5380"]},"retained":false,"historicalAffected":[]}],"coverage":[]}