Hugo: Symlink confinement bypass in os.ReadFile
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (github.com/gohugoio/hugo 0.163.1), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
- Affected
- >= 0.123.0, < 0.163.1
- Fixed in
- 0.163.1
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-c3wq-j5vh-68rc lists affected ranges: Go github.com/gohugoio/hugo >=0.123.0 <0.163.1
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS 4.0
- 6.0 · 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 · score source
- EPSS
- No dated EPSS signal available.
Source description
As published by the source; long descriptions are shortened.
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…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 1 · created ·
Published from ghsa record GHSA-c3wq-j5vh-68rc
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: GHSA-c3wq-j5vh-68rc Advisory: Hugo: Symlink confinement bypass in os.ReadFile IDs: GHSA-c3wq-j5vh-68rc Record: https://patchnext.com/advisories/ghsa-c3wq-j5vh-68rc (revision 1, source checked 26 Oct 2026, 15:24 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 6.0) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: github.com/gohugoio/hugo 0.163.1. A vendor fix does not mean a deployment is fixed. ## Affected components - Go github.com/gohugoio/hugo: affected >= 0.123.0, < 0.163.1; fixed in 0.163.1 ## Suggested inspection (read-only) - Go github.com/gohugoio/hugo: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on github.com/gohugoio/hugo. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-c3wq-j5vh-68rc (GitHub-reviewed advisory GHSA-c3wq-j5vh-68rc lists affected ranges: Go github.com/gohugoio/hugo >=0.123.0 <0.163.1) Commands are suggestions: review each one before running it.
Loading voting…