6.3medium
Hugo: security.http.urls allow-list bypass via HTTP redirects
- Severity
- 6.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.40% (higher than 25% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-vxgm-5rmg-5w8gGO-2026-5681
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| gohugoio hugo | >= 0.91.0, < 0.162.0 | CVE List |
| github.com/gohugoio/hugo (Go) | from 0.91.0 before 0.162.0 | GitHub Advisory Database, Go Vulnerability Database |
| gohugo hugo | from 0.91.0 before 0.162.0 | NVD |
All scores
| GitHub_M | 6.3medium CVSS:4.0 | 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 |
| GitHub | medium rating | |
| NVD | 5.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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.
Go Vulnerability Database
Hugo: security.http.urls allow-list bypass via HTTP redirects in github.com/gohugoio/hugo
NVD (es)
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.
References
| https://github.com/gohugoio/hugo/security/advisories/GHSA-vxgm-5rmg-5w8g | advisory, vendor-advisory, web | |
| https://github.com/gohugoio/hugo/commit/86fbb0f7a8bbb93e2e916390de9e5a4f24bf9f50 | fix, patch, web | |
| https://github.com/gohugoio/hugo/releases/tag/v0.162.0 | release-notes, web | |
| https://github.com/gohugoio/hugo | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-50134 changed 2026-07-07 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-vxgm-5rmg-5w8g changed 2026-07-07 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5681 changed 2026-07-07 | CC-BY-4.0 |
| NVD | CVE-2026-50134 changed 2026-10-25 | Public domain |