CVE-2026-89258
largeSymlink Path-Confinement Bypass in Hugo Static Site Generator
Hugo versions after v0.123.0 and before v0.165.0 did not drop symlinks in parent directories during direct resource lookups, allowing the generator's path confinement to be bypassed (CWE-59). An attacker who can place a symlink inside a mounted directory — or convince a site author to do so, for example in a locally vendored theme under themes/ — can cause direct-lookup functions such as resources.Get and os.ReadFile to follow the link and read files outside the intended project boundaries. The contents of those external files are then disclosed in the built site. Only Hugo sites building from locally mounted directories that contain symlinks are affected: themes mounted as Go modules fetched from GitHub have symlinks stripped on download and are unaffected, and multi-directory walks (e.g., content/asset walking) are also unaffected. No public proof-of-concept or known exploitation exists, the issue is not in CISA KEV, and the flaw is fixed in Hugo v0.165.0 as an incomplete-fix follow-up to GHSA-c3wq-j5vh-68rc and GHSA-fw87-fv5r-9fpw.
What to do: Upgrade to Hugo v0.165.0 or later, which drops parent-directory symlinks during direct resource lookups. Until then, audit locally vendored themes and any mounted directories (especially themes/) for symlinks pointing outside the project and remove or replace them, or switch to themes mounted as Go modules fetched from GitHub, which have symlinks stripped on download. This fix completes the earlier path-confinement fixes GHSA-c3wq-j5vh-68rc and GHSA-fw87-fv5r-9fpw, so confirm those are also applied.
| gohugoio Hugo (static site generator) | all versions after v0.123.0 and before v0.165.0; fixed in v0.165.0 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Hugo is a static site generator. In versions after v0.123.0 and before v0.165.0, symlinks in parent directories were not dropped during direct resource lookups, allowing path confinement to be bypassed. An attacker who can place — or who convinces a site author to place — a symlink inside a mounted directory (for example, in a locally vendored theme under themes/) can cause functions that perform direct lookups, such as resources.Get and os.ReadFile, to follow that symlink and read files outside the intended project boundaries, disclosing their contents in the built site. Themes mounted as Go modules fetched from GitHub have symlinks stripped on download and are not affected, and multi-directory walks (e.g. content/asset walking) are not affected. This issue is an incomplete-fix follow-up to GHSA-c3wq-j5vh-68rc and GHSA-fw87-fv5r-9fpw; it is fixed in v0.165.0.
- Weakness
- CWE-59
- Vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/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
In the news0 stories
No ingested article mentions this CVE yet.