Skip to main content

Hugo EUVDEUVD-2026-41907

| CVE-2026-58403 MEDIUM
Improper Link Resolution Before File Access (CWE-59)
2026-07-06 GitHub_M
5.9
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Compromise or supply malicious theme repository
  2. Delivery
    Plant symlink targeting sensitive file outside mount
  3. Exploit
    Developer or CI runs hugo build with malicious theme
  4. Install
    RootMappingFs.statRoot calls Stat instead of Lstat
  5. C2
    Mount boundary bypassed, target file read by hugo
  6. Execute
    Sensitive file contents embedded in site output
  7. Impact
    Attacker 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

hugo 0.123.0, < 0.163.1

Affected Packages

go github.com/gohugoio/hugo fix: 0.163.1
euvd hugo_0_123_0 fix: 0.163.1

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

Vendor (GitHub_M) PRIMARY 5.9 MEDIUM
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
vuln.today AI 5.3 MEDIUM

AT:P (symlink must be pre-planted) maps to AC:H; UI:A to UI:R; no integrity or availability impact applies.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 6.5 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jul 06, 2026 - 21:16 EUVD

DescriptionCVE.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

EPSS Score
0.4%
Top 71% exploitable
Prevalence
Medium
popular open-source static site generator among developers and documentation teams
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Hugo

View all
CVE-2020-26284 HIGH POC
8.5 Dec 21

Hugo is a fast and Flexible Static Site Generator built in Go. Rated high severity (CVSS 8.5), this vulnerability is rem

CVE-2026-89259 CRITICAL
9.3 Sep 11

Sandbox/permission-restriction bypass in the Hugo static site generator (versions after v0.43, fixed in v0.165.0) lets a

CVE-2026-75926 CRITICAL
9.3 Aug 18

Arbitrary command execution in Hugo 0.162.0 through 0.164.x occurs when the static site generator builds a project whose

CVE-2026-89258 CRITICAL
9.3 Sep 11

Arbitrary file disclosure in the Hugo static site generator (versions after v0.123.0 and before v0.165.0) lets an attack

CVE-2026-100692 HIGH
8.7 Sep 26

Symlink-following flaws in Hugo's theme and module mount confinement allow files outside a project's mount roots to be r

CVE-2026-100690 HIGH
8.7 Sep 26

Arbitrary file read in Hugo v0.161.0 through v0.165.0 allows an attacker who can contribute content to a Hugo project -

CVE-2026-100693 HIGH
8.6 Sep 26

Case-sensitivity bypass in Hugo's security.http.urls IP-literal deny rule lets builds running v0.162.0 through v0.165.x

CVE-2026-10582 HIGH
8.3 Aug 24

Server-side request forgery in Hugo static site generator (versions 0.91.0 through 0.165.0) allows an attacker who can s

CVE-2026-109596 MEDIUM
6.7 Oct 12

Local file disclosure in Hugo v0.162.0 through v0.166.x allows an attacker-controlled theme or module to place a symlink

CVE-2026-109595 MEDIUM
6.7 Oct 12

Path traversal in Hugo's asset pipeline lets a malicious theme or module bundle files from outside the project root into

CVE-2026-109574 MEDIUM
6.7 Oct 12

Path traversal in Hugo's css.Sass transpilation pipeline (all versions before v0.167.0) lets a malicious theme or module

CVE-2026-58402 MEDIUM
5.1 Jul 06

Stored XSS in Hugo's default code-block renderer allows an attacker with Markdown contribution rights to inject arbitrar

Vendor StatusVendor

SUSE

Severity: Moderate

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy