ZeroHour

CVE-2026-89258

large

Symlink Path-Confinement Bypass in Hugo Static Site Generator

CVSS 4.0
9.3 critical
EPSS
Published
()
Modified
AI analysis

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.

Affected
gohugoio Hugo (static site generator)all versions after v0.123.0 and before v0.165.0; fixed in v0.165.0
Estimated exposure
largeon the order of 100,000+ Hugo-built sites, with only sites using locally vendored/mounted directories containing symlinks actually exploitable (clearly an… — Hugo is one of the most widely used open-source static site generators, so the order of magnitude is inferred from its large community adoption rather than a count in the data, and the exploitable subset is narrowed to sites running…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

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 news

No ingested article mentions this CVE yet.