Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-50135: CWE-59: Improper Link Resolution Before File Access ('Link Following') in gohugoio hugo

0
Medium
VulnerabilityCVE-2026-50135cvecve-2026-50135cwe-59
Published: 07/06/2026 (07/06/2026, 19:52:04 UTC)
Source: CVE Database V5
Vendor/Project: gohugoio
Product: hugo

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.

CVSS v4.0

Score 6.9medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
High
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

github.com/gohugoio/hugo
pkg:golang/github.com/gohugoio/hugo
Affected versions
<0.162.0 >=0.123.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/06/2026, 20:52:34 UTC

Technical Analysis

CVE-2026-50135 is a CWE-59 (Improper Link Resolution Before File Access) vulnerability in Hugo, a static site generator. Between versions 0.123.0 and 0.161.1, a regression caused the RootMappingFs.statRoot function to use Stat (which follows symlinks) instead of Lstat (which does not). This allowed a direct call to resources.Get on a symlink pointing outside its mount to return the contents of the symlink's target file, potentially exposing arbitrary files accessible to the Hugo user. This vulnerability affects local mounts such as vendored themes but does not affect go-module themes from GitHub or directory walks where symlinks are stripped. The issue was resolved in version 0.162.0.

Potential Impact

An attacker able to place a symlink in a local mount directory (e.g., a vendored theme) could cause Hugo to read and expose arbitrary files outside the intended directory scope. This could lead to unauthorized disclosure of sensitive files accessible to the Hugo process user. The vulnerability does not require privileges or user interaction but does require the attacker to have the ability to plant symlinks locally. The CVSS 4.0 score is 6.9 (medium severity), reflecting network attack vector, low complexity, no privileges required, user interaction required, and high impact on confidentiality.

Mitigation Recommendations

Users should upgrade to Hugo version 0.162.0 or later, where the issue is fixed. No other official remediation or temporary fix is indicated. Until upgrading, avoid using untrusted local mounts or vendored themes that could contain malicious symlinks.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-06-03T18:49:32.275Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a4c11fc27e9c797192ee531

Added to database: 07/06/2026, 20:37:16 UTC

Last enriched: 07/06/2026, 20:52:34 UTC

Last updated: 07/06/2026, 21:25:04 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses