REDHAT-BUG-2521803: High severity Hugo Hugo vulnerability

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

Event History

Aug 24, 2026
Data Sourced
via Red Hat·10:48 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Who is realistically exposed to this issue?

Sites that use resources.GetRemote with security.http.urls configured to permit attacker-influenced hostnames are exposed. This is particularly relevant where URLs can be supplied through front matter or CMS fields during site builds.

2

What does an attacker need to exploit it?

An attacker needs the ability to provide a URL that is consumed by resources.GetRemote during a build. The supplied hostname must pass the configured URL allowlist while resolving to an internal, loopback, private, or cloud-metadata address.

3

Is the default configuration affected?

The available information identifies security.http.urls as the control governing outbound fetches, but does not state the default allowlist configuration. Exposure depends on whether the build permits attacker-controlled URLs through that policy.

4

How can I tell whether generated content may already contain exposed data?

Review build inputs, including front-matter and CMS URL fields, for values passed to resources.GetRemote, then inspect generated static output for response content from internal services. Also review allowed hostnames for names that could resolve to loopback, private, or cloud-metadata addresses.

5

What can be done if patching is not immediately possible?

Prevent untrusted users from supplying URLs used by resources.GetRemote and restrict the security.http.urls allowlist to trusted, controlled destinations. Avoid allowing hostnames whose DNS resolution could point to internal or cloud-metadata addresses.

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