CVE-2026-10582: Hugo 0.91.0 through 0.165.0 Server-Side Request Forgery via security.http.urls Lacking Destination Address Validation

Published Aug 24, 2026
·
Updated

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/resourcefactories/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.

Affected Software

1 affected component
Hugo Hugo>=0.91.0<=0.165.0

Event History

Aug 24, 2026
CVE Published
via MITRE·10:29 AM
Data Sourced
via MITRE·10:29 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:16 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Hugo builds are exposed when they use resources.GetRemote with security.http.urls configured and an attacker can influence a fetched URL through content, such as a front-matter or CMS field. The risk is greatest where the build environment can reach internal services, loopback addresses, or cloud metadata endpoints.

2

Does the configured URL allowlist prevent this attack?

No. The allowlist evaluates URL text and certain canonicalized numeric IPv4 forms, but it does not resolve hostnames or validate the destination address reached by the HTTP client. A permitted hostname can resolve to a loopback, private, or cloud-metadata address.

3

What does an attacker need to exploit it?

The attacker needs to supply or control a URL consumed by resources.GetRemote during a Hugo build. No authentication to the target internal service is described as necessary, but successful exploitation depends on the build system being able to connect to the target endpoint.

4

What is the impact if exploitation succeeds?

The build can fetch an internal endpoint and embed its response body into generated static site output. This allows data reachable from the build environment to be exfiltrated through the published build artifact.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203