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.
Published: 2026-07-06
Score: 4.6 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability stems from Hugo’s default security.http.urls policy, which blocks loopback, internal, and cloud‑metadata IPv4 addresses. However, the deny rule only checks for dotted‑decimal notation. Alternate numeric representations—such as integer, hex, or octal—resolve to the same internal endpoints when the host platform’s cgo system resolver is used. When an attacker supplies an untrusted or data‑derived URL to resources.GetRemote, Hugo may perform build‑time server‑side requests that reach internal or cloud‑metadata services, exposing sensitive data or enabling further attacks.

Affected Systems

The affected product is Hugo, the static site generator developed by gohugoio. Versions from 0.162.0 through 0.163.0 inclusive are impacted. The patch that restores proper IPv4 encoding checks is available in v0.163.1 and later releases.

Risk and Exploitability

The CVSS score of 4.6 indicates medium severity, while the EPSS score of less than 1% suggests a very low probability of exploitation. The vulnerability is not listed in the CISA KEV catalog. Attackers would need to provide a template or data source that, during the build process, contains a URL with an alternate IPv4 encoding and the build environment must use the cgo system resolver for the encoding to resolve to the internal target. Successful exploitation can allow the attacker to discover, exfiltrate, or otherwise manipulate internal services during the build.

Generated by OpenCVE AI on July 26, 2026 at 20:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Hugo to version 0.163.1 or later, which corrects the IPv4 encoding check.
  • Limit the use of resources.GetRemote in templates to trusted, vetted URLs only, and validate or sanitize any external inputs that may generate URLs.
  • If an upgrade is not immediately possible, configure the build environment to disable cgo system resolution or run the build in an isolated environment that prevents encoded addresses from resolving to internal hosts.
  • Review CI/CD pipelines to ensure no untrusted data sources can inject URLs into Hugo templates.

Generated by OpenCVE AI on July 26, 2026 at 20:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 07 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 06 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Gohugo
Gohugo hugo
Vendors & Products Gohugo
Gohugo hugo

Mon, 06 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
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.
Title Hugo security.http.urls deny rules bypassed by alternate IPv4 encodings
Weaknesses CWE-918
References
Metrics cvssV4_0

{'score': 4.6, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-07T15:08:53.514Z

Reserved: 2026-06-30T18:19:58.379Z

Link: CVE-2026-58404

cve-icon Vulnrichment

Updated: 2026-07-07T15:08:46.371Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T20:30:03Z

Weaknesses
  • CWE-918

    Server-Side Request Forgery (SSRF)