CVE-2026-10582 in Hugoinfo

Summary

by MITRE • 08/24/2026

Hugo's security.http.urls allowlist is the only control on outbound fetches made by resources.GetRemote, and it inspects the URL text alone. CheckAllowedHTTPURL in config/security/securityConfig.go applies the configured pattern list and then re-checks a canonicalised form of an integer, hex or octal IPv4 host, but it never resolves the hostname and never inspects the address the HTTP client actually connects to. The client constructed in resources/resource_factories/create/create.go installs no dial-time hook, so no check occurs at connection time either. A hostname that resolves to a loopback, private or cloud-metadata address therefore satisfies the policy, and the response body is embedded in the generated site. An attacker who can supply a URL through content, for example a front-matter field or a CMS field, can make the build fetch an internal endpoint and publish the response in the static output, so the build artifact itself carries the data out.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 08/24/2026

The vulnerability identified in Hugo stems from a critical flaw in its outbound HTTP request validation logic, specifically within the security.http.urls allowlist mechanism. This configuration is intended to restrict which external resources can be fetched during site generation using functions like resources.GetRemote. The current implementation relies exclusively on textual pattern matching of the URL string provided by the user or content author. It does not perform any DNS resolution prior to allowing the request, nor does it inspect the actual IP address that the underlying HTTP client connects to at runtime. This design creates a significant gap between policy enforcement and operational reality, as the security check is decoupled from the network layer where the true destination of the connection is determined.

The core technical flaw lies in how Hugo validates URLs against its allowlist. When a URL is submitted for fetching, the system applies configured regular expressions to the text string itself. While there is some additional logic that canonicalizes integer, hexadecimal, or octal representations of IPv4 addresses to prevent simple obfuscation tricks like using 0x7f000001 instead of 127.0.0.1, this check remains superficial. It does not resolve the hostname via DNS queries. Consequently, a malicious actor can supply a domain name that is explicitly permitted by the allowlist but resolves at runtime to an internal IP address such as those in loopback ranges (e.g., 127.0.0.1), private network spaces defined in RFC 1918, or cloud metadata endpoints like 169.254.169.254 used by major cloud providers to expose instance identity and credentials. Because the HTTP client constructed during resource fetching does not install any dial-time hooks or custom resolvers to intercept and validate the resolved IP address before establishing a connection, the request proceeds without further scrutiny.

This architectural weakness leads to severe operational impacts, primarily enabling Server-Side Request Forgery (SSRF) scenarios that can result in data exfiltration from internal networks. An attacker who has the ability to inject URLs into content fields, such as front-matter metadata or CMS inputs, can craft a request that appears compliant with security policies but targets sensitive internal services. Upon execution of the Hugo build process, the tool fetches the response body from these restricted endpoints and embeds it directly into the generated static site files. This means that even if the external-facing web server is hardened against direct SSRF attacks by end-users, the build artifact itself becomes a carrier for exfiltrated data. The sensitive information retrieved from internal APIs, database ports, or cloud metadata services is published alongside public content, effectively bypassing network-level controls and exposing confidential organizational data to anyone with access to the generated site files.

From a classification perspective, this vulnerability aligns closely with CWE-918, which addresses Server-Side Request Forgery (SSRF) flaws where server-side code makes requests to internal or external resources without proper validation of the destination address. It also relates to CWE-643, describing improper mitigation for XXE and SSRF vulnerabilities by relying on superficial checks rather than deep inspection. In terms of adversary tactics, this behavior mirrors techniques found in MITRE ATT&CK under T1071 Application Layer Protocol, where attackers use legitimate protocols like HTTP to exfiltrate data, and potentially T1534 Internal Spearphishing if the generated site is distributed internally, though the primary vector here is direct exploitation of the build process. The lack of DNS resolution validation represents a failure in implementing defense-in-depth principles for outbound network connections.

To mitigate this vulnerability, Hugo must implement robust hostname resolution checks prior to initiating any HTTP connection. This involves resolving all hostnames specified in allowed URLs and verifying that the resulting IP addresses do not fall into loopback (127.0.0.0/8), link-local (169.254.0.0/16), private address ranges (RFC 1918, RFC 4193), or cloud metadata special-use ranges. Additionally, the HTTP client should be configured with a custom dialer that performs these IP-based validations at connection time to prevent bypasses via DNS rebinding attacks where an allowed hostname might resolve to different IPs over time. Organizations using Hugo for static site generation should also enforce strict input validation on content fields and consider running build processes in isolated environments with restricted network access, ensuring that even if a vulnerability is exploited, the blast radius is contained within the CI/CD pipeline rather than affecting production infrastructure or internal services.

Responsible

VulnCheck

Reservation

06/01/2026

Disclosure

08/24/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!