{"id":"CVE-2026-58403","state":"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.","publishedAt":"2026-07-06T19:25:45.971Z","updatedAt":"2026-07-06T20:51:27.624Z","severity":{"score":5.9,"label":"Medium","version":"4.0","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","source":"GitHub_M"},"assigner":"GitHub_M","products":["gohugoio hugo"],"affected":[{"vendor":"gohugoio","product":"hugo","versions":[{"version":">= 0.123.0, < 0.163.1","status":"affected"}]}],"references":["https://github.com/gohugoio/hugo/security/advisories/GHSA-c3wq-j5vh-68rc","https://github.com/gohugoio/hugo/pull/15020","https://github.com/gohugoio/hugo/commit/cf9c8f93ca2a2838ce378f9e36d052ac2f79e229","https://github.com/gohugoio/hugo/releases/tag/v0.163.1"],"weaknesses":["CWE-59"],"ingestedAt":"2026-10-29T20:12:24.861Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/58xxx/CVE-2026-58403.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-58403","state":"PUBLISHED","datePublished":"2026-07-06T19:25:45.971Z","dateUpdated":"2026-07-06T20:51:27.624Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-06-30T18:19:58.379Z"},"containers":{"cna":{"title":"Hugo symlink confinement bypass in os.ReadFile","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"gohugoio","product":"hugo","versions":[{"version":">= 0.123.0, < 0.163.1","status":"affected"}]}],"references":[{"url":"https://github.com/gohugoio/hugo/security/advisories/GHSA-c3wq-j5vh-68rc","name":"https://github.com/gohugoio/hugo/security/advisories/GHSA-c3wq-j5vh-68rc","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/gohugoio/hugo/pull/15020","name":"https://github.com/gohugoio/hugo/pull/15020","tags":["x_refsource_MISC"]},{"url":"https://github.com/gohugoio/hugo/commit/cf9c8f93ca2a2838ce378f9e36d052ac2f79e229","name":"https://github.com/gohugoio/hugo/commit/cf9c8f93ca2a2838ce378f9e36d052ac2f79e229","tags":["x_refsource_MISC"]},{"url":"https://github.com/gohugoio/hugo/releases/tag/v0.163.1","name":"https://github.com/gohugoio/hugo/releases/tag/v0.163.1","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"ACTIVE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"NONE","vulnAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":5.9,"baseSeverity":"MEDIUM","vectorString":"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","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-59","lang":"en","description":"CWE-59: Improper Link Resolution Before File Access ('Link Following')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-07-06T19:25:45.971Z"},"source":{"advisory":"GHSA-c3wq-j5vh-68rc","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-06T20:51:16.911843Z","id":"CVE-2026-58403","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-06T20:51:27.624Z"}}]}}}