Vulnerability · Published Jul 6, 2026 · Assigned by GitHub_M
CVE-2026-58404Hugo security.http.urls deny rules bypassed by alternate IPv4 encodings
Medium 4.6
In plain English
A medium-severity server-side request forgery in hugo from gohugoio. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 31% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:14 | hugo | 0.165.0-1 | DEBIAN-CVE-2026-58404 |
| Go | github.com/gohugoio/hugo | 0.163.1 | GO-2026-5606 |
| Go | github.com/gohugoio/hugo | 0.163.1 | GHSA-r46f-3rpw-hxrv |
| Ubuntu:22.04:LTS | hugo | no fix listed | UBUNTU-CVE-2026-58404 |
| Ubuntu:25.10 | hugo | no fix listed | UBUNTU-CVE-2026-58404 |
| Ubuntu:26.04:LTS | hugo | no fix listed | UBUNTU-CVE-2026-58404 |
| Ubuntu:26.10 | hugo | no fix listed | UBUNTU-CVE-2026-58404 |
Affected products (as reported)
Weakness: CWE-918 · Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N
References
- https://github.com/gohugoio/hugo/security/advisories/GHSA-r46f-3rpw-hxrv x_refsource_CONFIRM
- https://github.com/gohugoio/hugo/pull/15020 x_refsource_MISC
- https://github.com/gohugoio/hugo/commit/a00b5c72ac57afe26df6688ece3ca544a56df372 x_refsource_MISC
- https://github.com/gohugoio/hugo/releases/tag/v0.163.1 x_refsource_MISC