Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCompromise or supply malicious theme repository
-
DeliveryPlant symlink targeting sensitive file outside mount
-
ExploitDeveloper or CI runs hugo build with malicious theme
-
InstallRootMappingFs.statRoot calls Stat instead of Lstat
-
C2Mount boundary bypassed, target file read by hugo
-
ExecuteSensitive file contents embedded in site output
-
ImpactAttacker retrieves exposed data from build artifacts
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
|
| Exploitation Conditions | Exploitation requires an attacker-controlled symlink to exist inside a Hugo theme directory or a locally configured mount at the time hugo processes it - meaning the attacker must have already compromised the theme source, the local filesystem, or the supply chain before the build runs. The user must then actively execute a hugo build that processes the malicious content (UI:A). The symlink target must be a file readable by the OS user running hugo; files protected by OS-level permissions (e.g., /etc/shadow, root-owned keys) remain inaccessible. Hugo versions prior to v0.123.0 are not affected because the Stat/Lstat regression was introduced in that release. Deployments that use only fully audited, locally maintained themes with no symbolic links cannot be exploited through this path. |
| Impact | The CVSS 4.0 score of 5.9 (AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N) captures the tension between high confidentiality impact and meaningful exploitation prerequisites. AT:P (attack requirements present) confirms that passive exploitation is not possible: an attacker must first succeed in placing a malicious symlink inside a theme or mount the victim will use - a supply-chain, repository-compromise, or social-engineering precondition. UI:A (active user interaction) further requires the victim to execute a hugo build against that content. The VC:H rating is accurate given successful exploitation yields arbitrary local file reads bounded only by OS permissions. No EPSS data was provided; absence from CISA KEV and the multi-step attack path together suggest exploitation is targeted rather than opportunistic. This is not a fire-drill critical for most teams, but organizations relying on third-party themes or CI pipelines that process untrusted content should treat it as a meaningful supply-chain risk. |
| Exploit ScenarioDerived | An attacker who controls a Hugo theme repository (via supply-chain compromise, typosquatting, or a malicious PR) plants a symlink inside the theme directory tree - for example, credentials.txt pointing to /home/user/.ssh/id_rsa or a CI environment file. When a developer or automated pipeline runs hugo build against that theme on an affected version, the Lstat regression causes hugo to read and embed the symlink target's contents into the generated site output, potentially exposing secrets to anyone with access to the built artifacts. No public proof-of-concept code has been identified, but the technique is straightforward for anyone aware of the CWE-59 class. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 06, 2026
Symlink traversal in Hugo's virtual filesystem (v0.123.0-v0.163.0) allows a symlink planted inside a theme or local mount to escape the mount sandbox and return the contents of arbitrary files accessible to the OS user running the hugo build. A regression in RootMappingFs.statRoot introduced a Stat call where Lstat was required, silently resolving symlinks that cross mount boundaries. No public exploit code or CISA KEV listing exists; the issue is fixed in v0.163.1.
RemediationAI
Upgrade Hugo to v0.163.1 or later, available at https://github.com/gohugoio/hugo/releases/tag/v0.163.1, which restores the correct Lstat call and re-establishes the filesystem sandbox. This is a drop-in patch release with no breaking changes per the advisory at https://github.com/gohugoio/hugo/security/advisories/GHSA-c3wq-j5vh-68rc. If immediate upgrade is blocked, audit all theme and mount directories for unexpected symbolic links before each build using 'find . -type l' and remove any that point outside the mount tree. As a compensating control, run hugo in a container or chroot with a minimal read-only filesystem overlay so that even a successfully followed symlink cannot reach sensitive files such as SSH keys, cloud credentials, or environment files; note this adds operational overhead. Restricting the OS user running hugo to a low-privilege account with no access to sensitive paths also limits the blast radius. Do not use untrusted third-party themes on affected versions.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Hugo uses an internal virtual filesystem layer called RootMappingFs to enforce sandbox boundaries between declared mount points, ensuring theme or content directories cannot read files outside their configured tree. CWE-59 (Improper Link Resolution Before File Access - 'Link Following') identifies the root cause class: a regression caused the statRoot method to call os.Stat, which transparently follows symbolic links at the OS level, instead of os.Lstat, which returns metadata for the symlink itself without following it. A direct os.ReadFile call on a filename that is a symlink would then resolve outside the mount boundary and return the target file's content. The affected CPE is cpe:2.3:a:gohugoio:hugo:*:*:*:*:*:*:*:*, spanning all platforms and build variants from v0.123.0 through v0.163.0. The root-cause commit is confirmed at cf9c8f93ca2a2838ce378f9e36d052ac2f79e229.
Know when Hugo gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
AT:P (symlink must be pre-planted) maps to AC:H; UI:A to UI:R; no integrity or availability impact applies.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Hugo is a fast and Flexible Static Site Generator built in Go. Rated high severity (CVSS 8.5), this vulnerability is rem
Sandbox/permission-restriction bypass in the Hugo static site generator (versions after v0.43, fixed in v0.165.0) lets a
Arbitrary command execution in Hugo 0.162.0 through 0.164.x occurs when the static site generator builds a project whose
Arbitrary file disclosure in the Hugo static site generator (versions after v0.123.0 and before v0.165.0) lets an attack
Symlink-following flaws in Hugo's theme and module mount confinement allow files outside a project's mount roots to be r
Arbitrary file read in Hugo v0.161.0 through v0.165.0 allows an attacker who can contribute content to a Hugo project -
Case-sensitivity bypass in Hugo's security.http.urls IP-literal deny rule lets builds running v0.162.0 through v0.165.x
Server-side request forgery in Hugo static site generator (versions 0.91.0 through 0.165.0) allows an attacker who can s
Local file disclosure in Hugo v0.162.0 through v0.166.x allows an attacker-controlled theme or module to place a symlink
Path traversal in Hugo's asset pipeline lets a malicious theme or module bundle files from outside the project root into
Path traversal in Hugo's css.Sass transpilation pipeline (all versions before v0.167.0) lets a malicious theme or module
Stored XSS in Hugo's default code-block renderer allows an attacker with Markdown contribution rights to inject arbitrar
EUVD-2026-41907
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB