{"id":"CVE-2026-58403","aliases":["DEBIAN-CVE-2026-58403","EUVD-2026-41907","GHSA-c3wq-j5vh-68rc","GO-2026-5309","RHSA-2026:36862","UBUNTU-CVE-2026-58403"],"status":"published","title":"Hugo symlink confinement bypass in os.ReadFile","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.","severity":{"version":"4.0","score":5.9,"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","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00475,"percentile":0.41343,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-59"],"published":"2026-06-19T17:45:38Z","modified":"2026-10-28T02:30:41Z","fixes":[{"ecosystem":"Go","package":"github.com/gohugoio/hugo","fixed_in":["0.163.1"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:14","package":"hugo","fixed_in":["0.165.0-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/gohugoio/hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.123.0"},{"fixed":"0.163.1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.131.0-1","0.131.0-2","0.150.0-1","0.150.1-1","0.151.0-1","0.151.1-1","0.151.2-1","0.152.1-1","0.152.2-1","0.153.0-1","0.153.1-1","0.153.1-2","0.153.1-3","0.153.2-1","0.154.1-1","0.154.2-1","0.154.2-2","0.154.3-1","0.154.5-1","0.155.1-1","0.155.2-1","0.155.3-1","0.157.0-1","0.157.0-2","0.157.0-3","0.158.0-1","0.158.0-2","0.158.0-3","0.159.0-1","0.159.1-1","0.159.2-1","0.160.0-1","0.160.0-2","0.160.1-1","0.161.0-1","0.161.1-1","0.162.1-1","0.162.1-2","0.162.1-3","0.162.1-4","0.162.1-5","0.162.1-6","0.162.1-7","0.165.0-1","0.165.0-2","0.165.0-3","0.166.0-1","0.166.0-2","0.167.0-1","0.167.0-2","0.167.0-3","0.167.0-4","0.167.0-5","0.167.0-6","0.167.0-7"]},{"source":"osv","ecosystem":"Debian:14","package":"hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.165.0-1"}]}],"versions":["0.131.0-1","0.131.0-2","0.150.0-1","0.150.1-1","0.151.0-1","0.151.1-1","0.151.2-1","0.152.1-1","0.152.2-1","0.153.0-1","0.153.1-1","0.153.1-2","0.153.1-3","0.153.2-1","0.154.1-1","0.154.2-1","0.154.2-2","0.154.3-1","0.154.5-1","0.155.1-1","0.155.2-1","0.155.3-1","0.157.0-1","0.157.0-2","0.157.0-3","0.158.0-1","0.158.0-2","0.158.0-3","0.159.0-1","0.159.1-1","0.159.2-1","0.160.0-1","0.160.0-2","0.160.1-1","0.161.0-1","0.161.1-1","0.162.1-1","0.162.1-2","0.162.1-3","0.162.1-4","0.162.1-5","0.162.1-6","0.162.1-7"]},{"source":"osv","ecosystem":"Go","package":"github.com/gohugoio/hugo","ranges":[{"type":"SEMVER","events":[{"introduced":"0.123.0"},{"fixed":"0.163.1"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/gohugoio/hugo","ranges":[{"type":"SEMVER","events":[{"introduced":"0.123.0"},{"fixed":"0.163.1"}]}]},{"source":"osv","ecosystem":"Red Hat:hummingbird:1","package":"hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0:0.163.3-0.1.hum1"}]}],"bundled":4},{"source":"osv","ecosystem":"Ubuntu:16.04:LTS","package":"hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.15+git20160109.147.dd1d655-1","0.15+git20160109.147.dd1d655-2","0.15+git20160128.179.5def6d9-1","0.15+git20160206.203.ed23711-1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.25.1-2","0.26-1","0.35-1","0.37.1-1","0.38-1","0.39-1","0.40-1","0.40.1-1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.57.2-1","0.58.3-1","0.59.1-1.1","0.68.3-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.80.0-6","0.89.4-2","0.90.0-1","0.90.1-1","0.91.0-1","0.91.2-1","0.92.0-1","0.92.1-1build1","0.92.2-1","0.92.2-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.113.0-3","0.119.0-2","0.120.3-1","0.120.4-1","0.121.2-1","0.122.0-1","0.123.7-1build1","0.123.7-1ubuntu0.1","0.123.7-1ubuntu0.2","0.123.7-1ubuntu0.2+esm1","0.123.7-1ubuntu0.3","0.123.7-1ubuntu0.3+esm1","0.123.7-1ubuntu0.3+esm2"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.131.0-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.154.5-1","0.162.1-5","0.162.1-7"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"hugo","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.131.0-1","0.152.2-1","0.153.1-3","0.153.2-1","0.154.2-2","0.154.3-1","0.154.5-1"]}],"products":[{"vendor":"gohugo","product":"hugo"},{"vendor":"gohugoio","product":"hugo"}],"references":[{"url":"https://github.com/gohugoio/hugo/security/advisories/GHSA-c3wq-j5vh-68rc","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web","article","report"]},{"url":"https://github.com/gohugoio/hugo/pull/15020","tags":["x_refsource_MISC","Issue Tracking","fix","article","report"]},{"url":"https://github.com/gohugoio/hugo/commit/cf9c8f93ca2a2838ce378f9e36d052ac2f79e229","tags":["x_refsource_MISC","Patch","fix","article","report"]},{"url":"https://github.com/gohugoio/hugo/releases/tag/v0.163.1","tags":["x_refsource_MISC","Release Notes","web","article","report"]},{"url":"https://github.com/advisories/GHSA-c3wq-j5vh-68rc"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58403.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58403","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-58403","tags":["advisory"]},{"url":"https://github.com/gohugoio/hugo","tags":["package"]},{"url":"https://access.redhat.com/errata/RHSA-2026:36862","tags":["advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-58402","tags":["report"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-58403","tags":["report"]},{"url":"https://access.redhat.com/security/updates/classification/","tags":["article"]},{"url":"https://images.redhat.com/","tags":["article"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-50133","tags":["report"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-58404","tags":["report"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_36862.json","tags":["advisory"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2497463","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-50133","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-50133","tags":["advisory"]},{"url":"https://github.com/gohugoio/hugo/commit/e41a06447daa3071a01f333fdcec0a5153c3c8d1","tags":["article"]},{"url":"https://github.com/gohugoio/hugo/releases/tag/v0.162.0","tags":["article"]},{"url":"https://github.com/gohugoio/hugo/security/advisories/GHSA-c54g-xjwj-8g82","tags":["article"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2497467","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-58402","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58402","tags":["advisory"]},{"url":"https://github.com/gohugoio/hugo/commit/ce1a7e0bce3713af40496ded3c2c0ceeed49231d","tags":["article"]},{"url":"https://github.com/gohugoio/hugo/pull/15051","tags":["article"]},{"url":"https://github.com/gohugoio/hugo/releases/tag/v0.163.3","tags":["article"]},{"url":"https://github.com/gohugoio/hugo/security/advisories/GHSA-q76j-gcg9-vxc6","tags":["article"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2497460","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-58403","tags":["advisory","report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2497450","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-58404","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-58404","tags":["advisory"]},{"url":"https://github.com/gohugoio/hugo/commit/a00b5c72ac57afe26df6688ece3ca544a56df372","tags":["article"]},{"url":"https://github.com/gohugoio/hugo/security/advisories/GHSA-r46f-3rpw-hxrv","tags":["article"]},{"url":"https://ubuntu.com/security/CVE-2026-58403","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-58403","title":"Hugo symlink confinement bypass in os.ReadFile","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.","status":"published","published":"2026-07-06T19:25:45.971Z","modified":"2026-07-06T20:51:27.624Z","cvss":[{"version":"4.0","score":5.9,"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","level":"medium","assessor":"cna"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T13:47:39.876248Z"}],"euvd":[{"id":"EUVD-2026-41907","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.","status":"published","published":"2026-07-06T19:25:45Z","modified":"2026-07-06T20:51:27Z","cvss":[{"version":"4.0","score":5.9,"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","level":"medium"}],"updated_at":"2026-11-02T18:20:12.41351Z"}],"ghsa":[{"id":"GHSA-c3wq-j5vh-68rc","title":"Hugo: Symlink confinement bypass in os.ReadFile","description":"**Affected versions:** v0.123.0 through v0.163.0. Earlier versions are not affected.\n**Fixed in:** v0.163.1.\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 `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`.","status":"published","published":"2026-06-19T17:45:38Z","modified":"2026-06-19T17:45:39Z","cvss":[{"version":"4.0","score":6,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N","level":"medium"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T14:40:30.53004Z"}],"nvd":[{"id":"CVE-2026-58403","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.","status":"published","published":"2026-07-06T20:16:38.173Z","modified":"2026-10-25T20:10:00.147Z","cvss":[{"version":"4.0","score":5.9,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T14:12:28.040501Z"}],"osv":[{"id":"CVE-2026-58403","title":"Hugo symlink confinement bypass in os.ReadFile","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.","status":"published","published":"2026-07-06T19:25:45.971Z","modified":"2026-10-28T02:30:41.728650349Z","cvss":[{"version":"4.0","score":5.9,"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","level":"medium"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T15:45:12.496548Z"},{"id":"DEBIAN-CVE-2026-58403","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.","status":"published","published":"2026-07-06T20:16:38.173Z","modified":"2026-10-26T12:02:38.417302835Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:57.590991Z"},{"id":"GHSA-c3wq-j5vh-68rc","title":"Hugo: Symlink confinement bypass in os.ReadFile","description":"**Affected versions:** v0.123.0 through v0.163.0. Earlier versions are not affected.\n**Fixed in:** v0.163.1.\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 `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`.","status":"published","published":"2026-06-19T17:45:38Z","modified":"2026-07-24T19:11:41.347888762Z","cvss":[{"version":"4.0","score":6,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N","level":"medium"}],"cwes":["CWE-59"],"updated_at":"2026-11-02T15:46:44.571161Z"},{"id":"RHSA-2026:36862","title":"Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update","status":"published","published":"2026-07-29T10:09:26Z","modified":"2026-09-08T10:13:09Z","cvss":[{"version":"3.1","score":6.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:53:19.963895Z"},{"id":"UBUNTU-CVE-2026-58403","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.","status":"published","published":"2026-07-06T20:16:00Z","modified":"2026-10-17T12:59:13.511899574Z","cvss":[{"version":"4.0","score":5.9,"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","level":"medium"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T16:56:41.911783Z"},{"id":"GO-2026-5309","title":"Hugo: Symlink confinement bypass in os.ReadFile in github.com/gohugoio/hugo","description":"Hugo: Symlink confinement bypass in os.ReadFile in github.com/gohugoio/hugo","status":"published","published":"2026-07-24T18:35:55Z","modified":"2026-07-24T19:11:41.347888762Z","updated_at":"2026-11-02T15:47:02.556545Z"}]}}
