CVE-2026-50135: CWE-59: Improper Link Resolution Before File Access ('Link Following') in gohugoio hugo
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.
AI Analysis
Technical Summary
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.
CVE-2026-50135: CWE-59: Improper Link Resolution Before File Access ('Link Following') in gohugoio 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
Affected software
pkg:golang/github.com/gohugoio/hugoRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.