Description
Hugo is a static site generator. From 0.123.0 to 0.161.1, a regression made  RootMappingFs.statRoot  use  Stat  (follows symlinks) instead of  Lstat , so a direct  resources.Get  of a symlink pointing outside its mount returned the target's contents — letting a symlink planted in a local mount (e.g. a vendored  themes/  theme) read arbitrary files accessible to the Hugo user. Go-module themes from GitHub (symlinks stripped) and directory walks were unaffected. Fixed in 0.162.0.
Published: 2026-07-06
Score: 6.9 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Hugo is a static site generator. From version 0.123.0 to 0.161.1, a regression caused RootMappingFs.statRoot to call Stat instead of Lstat, so a direct resources.Get of a symlink pointing outside its mount returned the target's contents—letting a symlink planted in a local mount (e.g., a vendored themes/ theme) read arbitrary files accessible to the Hugo user. Go-module themes from GitHub (symlinks stripped) and directory walks were unaffected. Fixed in 0.162.0. The vulnerability is a local file read (CWE-59).

Affected Systems

All installations of Hugo from 0.123.0 through 0.161.1 are vulnerable. The flaw triggers when a local mount—such as a vendored theme under the themes/ directory—contains a symlink that points outside the intended directory. A direct call to resources.Get will resolve that symlink and return the target file’s contents, granting the Hugo build process access to arbitrary files it would normally not see. The issue was fixed in Hugo 0.162.0 and later releases.

Risk and Exploitability

The vulnerability carries a CVSS score of 6.9, indicating moderate severity. An EPSS score of < 1% indicates a very low but nonzero exploitation probability, and it is not listed in CISA's KEV catalog. Based on the description, it is inferred that the attack vector requires an attacker to place a symlink within a local mount, such as a vendored theme under the themes/ directory, that points outside the intended directory tree. Once such a symlink is present, a direct call to resources.Get will expose the target file’s contents to the Hugo build process running as the user.

Generated by OpenCVE AI on July 23, 2026 at 14:29 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Hugo to version 0.162.0 or later to ensure resources.Get no longer follows symlinks outside the mount root.
  • Review any local theme directories or other mounts for symlinks that point beyond the intended directory tree and remove or adjust them to avoid unintended access.
  • If upgrade is not yet possible, run Hugo builds in a restricted sandbox or container to deny access to files outside the project.

Generated by OpenCVE AI on July 23, 2026 at 14:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-fw87-fv5r-9fpw Hugo: Symlink confinement bypass in resources.Get
History

Mon, 13 Jul 2026 15:00:00 +0000

Type Values Removed Values Added
First Time appeared Gohugo
Gohugo hugo
Vendors & Products Gohugo
Gohugo hugo

Tue, 07 Jul 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 06 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Description Hugo is a static site generator. From 0.123.0 to 0.161.1, a regression made  RootMappingFs.statRoot  use  Stat  (follows symlinks) instead of  Lstat , so a direct  resources.Get  of a symlink pointing outside its mount returned the target's contents — letting a symlink planted in a local mount (e.g. a vendored  themes/  theme) read arbitrary files accessible to the Hugo user. Go-module themes from GitHub (symlinks stripped) and directory walks were unaffected. Fixed in 0.162.0.
Title Hugo: Symlink confinement bypass in resources.Get
Weaknesses CWE-59
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-07T16:57:29.874Z

Reserved: 2026-06-03T18:49:32.275Z

Link: CVE-2026-50135

cve-icon Vulnrichment

Updated: 2026-07-07T16:52:35.316Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-23T14:30:17Z

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')