CVE-2026-58404: CWE-918: Server-Side Request Forgery (SSRF) in gohugoio hugo
Hugo is a static site generator. From v0.162.0 through v0.163.0, the default security.http.urls policy denies requests to loopback, internal, and cloud-metadata IPv4 literals, but the deny rule only matched dotted-decimal notation, so alternate IPv4 encodings of the same addresses, including integer, hex, or octal, passed the policy. When a template passes an untrusted or data-derived URL to resources.GetRemote and the host platform uses the cgo system resolver, these encodings resolve to the blocked address, allowing build-time server-side requests to loopback and internal services, including the cloud-metadata endpoint in hosted or CI builds; the same check is reused on redirects, so the gap also applies to each redirect hop. This issue is fixed in v0.163.1.
AI Analysis
Technical Summary
Hugo versions 0.162.0 through 0.163.0 have an SSRF vulnerability due to incomplete enforcement of the security.http.urls policy. The deny rule blocks requests to certain IP ranges only when expressed in dotted-decimal format, but alternate IPv4 encodings (integer, hex, octal) bypass this check. When a template uses untrusted or data-derived URLs with resources.GetRemote on platforms using the cgo resolver, these alternate encodings resolve to blocked addresses, enabling SSRF to loopback, internal, and cloud-metadata endpoints during site builds. The vulnerability also applies to each redirect hop. This issue is resolved in version 0.163.1.
Potential Impact
An attacker able to influence URLs passed to resources.GetRemote can cause the Hugo build process to make unauthorized requests to internal network services, including cloud metadata endpoints, potentially exposing sensitive information or enabling further attacks within the build environment. The vulnerability is limited to affected versions and requires the host platform to use the cgo system resolver. The CVSS 4.6 score indicates a medium severity impact with partial attack complexity and some privileges required.
Mitigation Recommendations
Upgrade to Hugo version 0.163.1 or later, where this SSRF vulnerability is fixed. Until then, avoid passing untrusted or data-derived URLs to resources.GetRemote, especially on platforms using the cgo resolver. Patch status is not explicitly stated as 'official-fix' in the data, but the description confirms the issue is fixed in v0.163.1. Therefore, applying this update is the recommended remediation.
CVE-2026-58404: CWE-918: Server-Side Request Forgery (SSRF) in gohugoio hugo
Description
Hugo is a static site generator. From v0.162.0 through v0.163.0, the default security.http.urls policy denies requests to loopback, internal, and cloud-metadata IPv4 literals, but the deny rule only matched dotted-decimal notation, so alternate IPv4 encodings of the same addresses, including integer, hex, or octal, passed the policy. When a template passes an untrusted or data-derived URL to resources.GetRemote and the host platform uses the cgo system resolver, these encodings resolve to the blocked address, allowing build-time server-side requests to loopback and internal services, including the cloud-metadata endpoint in hosted or CI builds; the same check is reused on redirects, so the gap also applies to each redirect hop. This issue is fixed in v0.163.1.
CVSS v4.0
Score 4.6medium
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
Hugo versions 0.162.0 through 0.163.0 have an SSRF vulnerability due to incomplete enforcement of the security.http.urls policy. The deny rule blocks requests to certain IP ranges only when expressed in dotted-decimal format, but alternate IPv4 encodings (integer, hex, octal) bypass this check. When a template uses untrusted or data-derived URLs with resources.GetRemote on platforms using the cgo resolver, these alternate encodings resolve to blocked addresses, enabling SSRF to loopback, internal, and cloud-metadata endpoints during site builds. The vulnerability also applies to each redirect hop. This issue is resolved in version 0.163.1.
Potential Impact
An attacker able to influence URLs passed to resources.GetRemote can cause the Hugo build process to make unauthorized requests to internal network services, including cloud metadata endpoints, potentially exposing sensitive information or enabling further attacks within the build environment. The vulnerability is limited to affected versions and requires the host platform to use the cgo system resolver. The CVSS 4.6 score indicates a medium severity impact with partial attack complexity and some privileges required.
Mitigation Recommendations
Upgrade to Hugo version 0.163.1 or later, where this SSRF vulnerability is fixed. Until then, avoid passing untrusted or data-derived URLs to resources.GetRemote, especially on platforms using the cgo resolver. Patch status is not explicitly stated as 'official-fix' in the data, but the description confirms the issue is fixed in v0.163.1. Therefore, applying this update is the recommended remediation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-30T18:19:58.379Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a4c076a27e9c7971920cc29
Added to database: 07/06/2026, 19:52:10 UTC
Last enriched: 07/14/2026, 08:56:46 UTC
Last updated: 08/20/2026, 10:52:10 UTC
Views: 111
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.