CVE-2026-58404: Hugo security.http.urls deny rules bypassed by alternate IPv4 encodings
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in v0.163.1 - Configuration
Upgrade to v0.163.1 to close the bypass where alternate IPv4 encodings of loopback/internal/cloud-metadata IPv4 literals were not matched by the deny rule.
Hugo security.http.urls deny rules = Ensure deny rules match alternate IPv4 encodings (integer/hex/octal) in addition to dotted-decimal notation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-58404?
The severity of CVE-2026-58404 is classified as medium with a score of 4.6 according to CVSS.
How do I fix CVE-2026-58404?
To fix CVE-2026-58404, upgrade Hugo to version 0.163.1 or later, which addresses the bypass of deny rules.
What type of vulnerability is CVE-2026-58404?
CVE-2026-58404 is categorized as a Server-Side Request Forgery (SSRF) vulnerability.
What versions of Hugo are affected by CVE-2026-58404?
CVE-2026-58404 affects Hugo versions from 0.162.0 through 0.163.0.
What is the impact of CVE-2026-58404?
The impact of CVE-2026-58404 is that it allows attackers to bypass security rules intended to block requests to certain IPv4 addresses.