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 function RootMappingFs.statRoot to use Stat (which follows symbolic links) instead of Lstat (which does not). This allowed a direct call to resources.Get on a symlink pointing outside its mount to return the target file's contents, potentially exposing arbitrary files accessible to the Hugo user. The vulnerability does not affect go-module themes from GitHub (which strip symlinks) or directory walks. The issue was resolved in version 0.162.0.
Potential Impact
An attacker able to plant a symlink in a local mount (such as a vendored themes directory) could cause Hugo to read and expose the contents of arbitrary files outside the intended directory. This could lead to unauthorized disclosure of sensitive information accessible to the Hugo process user. There is no indication of privilege escalation or remote code execution. The CVSS 4.0 base score is 6.9 (medium severity), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, and high confidentiality impact.
Mitigation Recommendations
Upgrade Hugo to version 0.162.0 or later, where this vulnerability is fixed. No other official remediation or temporary fixes are documented. Users should avoid using affected versions in production environments until patched.
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 function RootMappingFs.statRoot to use Stat (which follows symbolic links) instead of Lstat (which does not). This allowed a direct call to resources.Get on a symlink pointing outside its mount to return the target file's contents, potentially exposing arbitrary files accessible to the Hugo user. The vulnerability does not affect go-module themes from GitHub (which strip symlinks) or directory walks. The issue was resolved in version 0.162.0.
Potential Impact
An attacker able to plant a symlink in a local mount (such as a vendored themes directory) could cause Hugo to read and expose the contents of arbitrary files outside the intended directory. This could lead to unauthorized disclosure of sensitive information accessible to the Hugo process user. There is no indication of privilege escalation or remote code execution. The CVSS 4.0 base score is 6.9 (medium severity), reflecting network attack vector, low attack complexity, no privileges required, user interaction required, and high confidentiality impact.
Mitigation Recommendations
Upgrade Hugo to version 0.162.0 or later, where this vulnerability is fixed. No other official remediation or temporary fixes are documented. Users should avoid using affected versions in production environments until patched.
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/14/2026, 08:54:08 UTC
Last updated: 08/20/2026, 22:52:13 UTC
Views: 65
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.