Summary
Hugo: security.http.urls deny rules bypassed by alternate IPv4 encodings (SSRF)
Impact
The default security.http.urls policy denies requests to loopback, internal,
and cloud-metadata IPv4 literals (e.g. http://127.0.0.1/,
http://169.254.169.254/). The deny rule only matched dotted-decimal notation,
so alternate IPv4 encodings of the same addresses, integer, hex, or octal,
which contain no dot, passed the policy:
http://2130706433/→127.0.0.1http://2852039166/→169.254.169.254(cloud metadata)http://0x7f000001/,http://017700000001/,http://0/
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/CI builds. The same check is reused on
redirects, so the gap also applies to each redirect hop.
This affects sites that rely on security.http.urls as a security boundary
while fetching attacker-influenced remote URLs; it does not affect sites that
fully trust the URLs they fetch.
Patches
Fixed in v0.163.1. Integer/hex/octal IPv4 hosts are now canonicalized to
dotted-decimal before the policy is applied, so every encoding of an address is
treated alike. No configuration change is required.
Workarounds
Avoid passing untrusted URLs to resources.GetRemote, or
tighten security.http.urls to an explicit allow-list of trusted hosts.
Affected versions
v0.162.0 – v0.163.0 (patched in v0.163.1).
Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside. Typical impact: access to internal metadata services, internal APIs, or cloud credentials.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is GHSA-R46F-3RPW-HXRV? GHSA-R46F-3RPW-HXRV is a high-severity server-side request forgery (SSRF) vulnerability in github.com/gohugoio/hugo (go), affecting versions >= 0.162.0, < 0.163.1. It is fixed in 0.163.1. Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside.
- Which versions of github.com/gohugoio/hugo are affected by GHSA-R46F-3RPW-HXRV? github.com/gohugoio/hugo (go) versions >= 0.162.0, < 0.163.1 is affected.
- Is there a fix for GHSA-R46F-3RPW-HXRV? Yes. GHSA-R46F-3RPW-HXRV is fixed in 0.163.1. Upgrade to this version or later.
- Is GHSA-R46F-3RPW-HXRV exploitable, and should I be worried? Whether GHSA-R46F-3RPW-HXRV is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-R46F-3RPW-HXRV is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-R46F-3RPW-HXRV? Upgrade
github.com/gohugoio/hugoto 0.163.1 or later.