{"id":"CVE-2026-50134","aliases":["CVE-2026-50134","GHSA-vxgm-5rmg-5w8g","GO-2026-5681"],"related":[],"kind":"vulnerability","state":"published","title":"Hugo: security.http.urls allow-list bypass via HTTP redirects","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"**Commit:** [86fbb0f7a8](https://github.com/gohugoio/hugo/commit/86fbb0f7a8) — _security: Validate redirects against security.http.urls_\n**Affected versions:** v0.91.0 (when `security.http.urls` was introduced) through v0.161.1.\n**Fixed in:** v0.162.0.\n**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`.\n\n**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.\n\n**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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Hugo: security.http.urls allow-list bypass via HTTP redirects in github.com/gohugoio/hugo","format":"markdown","source":"go"},{"lang":"es","text":"Hugo es un generador de sitios estáticos. Desde la versión 0.91.0 hasta la 0.162.0, resources.GetRemote aplica security.http.urls a la URL con la que se le invoca, pero no revalidaba las URLs intermedias en las redirecciones HTTP 3xx. Un servidor permitido (o un atacante que controle su DNS o respuesta) podría, por lo tanto, redirigir la solicitud a un host que la política pretendía prohibir y Hugo obtendría el contenido del objetivo redirigido. El mismo bypass también eliminaba cualquier restricción de forma de host que el operador hubiera establecido. Esta vulnerabilidad está corregida en la versión 0.162.0.","source":"nvd"}],"published":"2026-06-16T19:22:37.000Z","modified":"2026-10-25T20:10:00.147Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N","score":5.8,"rating":"MEDIUM"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":">= 0.91.0, < 0.162.0","status":"affected"}],"vendor":"gohugoio","product":"hugo","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.91.0","status":"affected","fixed":"0.162.0"}],"ecosystem":"Go","package":"github.com/gohugoio/hugo","purl":"pkg:golang/github.com/gohugoio/hugo","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.91.0","status":"affected","fixed":"0.162.0"}],"ecosystem":"Go","package":"github.com/gohugoio/hugo","purl":"pkg:golang/github.com/gohugoio/hugo","source":"go"},{"ranges":[{"status":"affected","introduced":"0.91.0","fixed":"0.162.0"}],"vendor":"gohugo","product":"hugo","cpe":"cpe:2.3:a:gohugo:hugo:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/gohugoio/hugo/security/advisories/GHSA-vxgm-5rmg-5w8g","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gohugoio/hugo/commit/86fbb0f7a8bbb93e2e916390de9e5a4f24bf9f50","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gohugoio/hugo/releases/tag/v0.162.0","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gohugoio/hugo","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-07T16:52:13.588Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-50134","url":"https://www.cve.org/CVERecord?id=CVE-2026-50134","licence":"CVE Terms of Use","modified":"2026-07-07T16:57:36.713Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vxgm-5rmg-5w8g","url":"https://github.com/advisories/GHSA-vxgm-5rmg-5w8g","licence":"CC-BY-4.0","modified":"2026-07-07T20:41:30.298Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5681","url":"https://pkg.go.dev/vuln/GO-2026-5681","licence":"CC-BY-4.0","modified":"2026-07-07T20:30:17.537Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-50134","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-50134","licence":"Public domain","modified":"2026-10-25T20:10:00.147Z"}],"updatedAt":"2026-11-25T22:59:27.243Z","epss":{"score":0.00396,"percentile":0.25399,"date":"2026-11-30T12:00:22.000Z"}}