CVE-2026-50134: Hugo: security.http.urls allow-list bypass via HTTP redirects

Published Jun 16, 2026
·
Updated

Commit: 86fbb0f7a8 — security: Validate redirects against security.http.urls Affected versions: v0.91.0 (when security.http.urls was introduced) through v0.161.1. Fixed in: v0.162.0. Severity: Only relevant for sites that rely on security.http.urls as a trust boundary — e.g. CI builds that fetch remote resources but want to constrain which hosts can be reached. Not an issue if you fully trust every URL passed to resources.GetRemote.

Description. resources.GetRemote enforces security.http.urls on the URL it is called with, but until v0.162.0 it did not re-validate intermediate URLs on HTTP 3xx redirects. An allowed server (or an attacker controlling its DNS or response) could therefore redirect the request to a host that the policy was meant to forbid — for example, http://localhost/ or an internal IP — and Hugo would fetch from the redirected target. The same bypass also lifted any host-shape restriction the operator had put in place.

Mitigation. v0.162.0 installs a CheckRedirect on the HTTP client used by resources.GetRemote that re-runs security.http.urls on every redirect target and caps the redirect chain at 10 hops. No configuration change is required.

Other sources

Hugo is a static site generator. From 0.91.0 until 0.162.0, resources.GetRemote enforces security.http.urls on the URL it is called with, but it did not re-validate intermediate URLs on HTTP 3xx redirects. An allowed server (or an attacker controlling its DNS or response) could therefore redirect the request to a host that the policy was meant to forbid and Hugo would fetch from the redirected target. The same bypass also lifted any host-shape restriction the operator had put in place. This vulnerability is fixed in 0.162.0.

MITRE

Affected Software

2 affected componentsFixes available
go/github.com/gohugoio/hugo>=0.91.0<0.162.0
0.162.0
gohugo Hugo>=0.91.0<0.162.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/gohugoio/hugo to a version that resolves this vulnerability.

    Fixed in 0.162.0
  2. Upgrade

    Upgrade hugo to a version that resolves this vulnerability.

    Fixed in v0.162.0
  3. Compensating control

    If you cannot upgrade to v0.162.0 yet, do not use security.http.urls as a trust boundary for untrusted inputs to resources.GetRemote; fully trust every URL passed to resources.GetRemote to prevent bypass via HTTP 3xx redirects.

Event History

Jun 16, 2026
Advisory Published
via GitHub·07:22 PM
Data Sourced
via GitHub·07:22 PM
DescriptionWeaknessAffected Software
Jul 6, 2026
CVE Published
via MITRE·07:42 PM
Data Sourced
via MITRE·07:42 PM
DescriptionWeakness
Data Sourced
via NVD·08:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-50134?

CVE-2026-50134 has a risk score of 47, indicating a moderate level of severity.

2

How do I fix CVE-2026-50134?

CVE-2026-50134 can be fixed by upgrading to version v0.162.0 or later of Hugo.

3

What versions are affected by CVE-2026-50134?

CVE-2026-50134 affects Hugo versions from v0.91.0 to v0.161.1.

4

What type of vulnerability is CVE-2026-50134?

CVE-2026-50134 is classified as a Server-Side Request Forgery (SSRF) vulnerability.

5

Who should be concerned about CVE-2026-50134?

CVE-2026-50134 is primarily relevant for sites that rely on the `security.http.urls` configuration in Hugo.

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