Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/gohugoio/hugo
  4. ›
  5. CVE-2026-50134

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

June 16, 2026

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.

References

  • github.com/advisories/GHSA-vxgm-5rmg-5w8g
  • github.com/gohugoio/hugo/commit/86fbb0f7a8bbb93e2e916390de9e5a4f24bf9f50
  • github.com/gohugoio/hugo/releases/tag/v0.162.0
  • github.com/gohugoio/hugo/security/advisories/GHSA-vxgm-5rmg-5w8g
  • nvd.nist.gov/vuln/detail/CVE-2026-50134

Code Behaviors & Features

Detect and mitigate CVE-2026-50134 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.91.0 before 0.162.0

Fixed versions

  • 0.162.0

Solution

Upgrade to version 0.162.0 or above.

Weakness

  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

go/github.com/gohugoio/hugo/CVE-2026-50134.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:23:03 +0000.