Hurl is a command line tool that runs and tests HTTP requests defined in plain text files. In version 8.0.1 and earlier, the redirect…
GitHub_M·CWE-201·Published 2026-08-20
Hurl is a command line tool that runs and tests HTTP requests defined in plain text files. In version 8.0.1 and earlier, the redirect handling in packages/hurl/src/http/client.rs strips Authorization and Cookie headers and basic-auth credentials when a redirect changes host, but it carries RequestSpec.cookies created from the dedicated [Cookies] section into the redirected request. An attacker-controlled redirect can therefore receive authentication or session cookies that should remain scoped to the original host. Cookies supplied through a raw Cookie header are stripped and are not affected by this specific path. This issue is reported as fixed in version 8.1.0.
Hurl is a command line tool that runs and tests HTTP requests defined in plain text files. In version 8.0.1 and earlier, the redirect handling in packages/hurl/src/http/client.rs strips Authorization and Cookie headers and basic-auth credentials when a redirect changes host, but it carries RequestSpec.cookies created from the dedicated [Cookies] section into the redirected request. An attacker-controlled redirect can therefore receive authentication or session cookies that should remain scoped to the original host. Cookies supplied through a raw Cookie header are stripped and are not affected by this specific path. This issue is reported as fixed in version 8.1.0.
## The Bug Hurl <= 8.0.1 lets you define cookies two ways in a .hurl file: 1. As a raw Cookie: header in the [Header]/headers area 2. In a dedicated [Cookies] section (parsed into RequestSpec.cookies) When following a redirect to a different host, Hurl correctly strips security-sensitive data (Authorization, Cookie header, and basic-auth user) to avoid leaking credentials cross-host — mirroring libcurl's default behavior. But it only stripped the cookie that came in as a header. Cookies declared in the [Cookies] section were carried over to the new host unchanged — a credential-leak bug. Hurl file that leaks cookies: ```hurl GET http://localhost:8000/follow-redirect-basic-auth?change_host=true [Cookies] fruit: lemon HTTP 200 ``` Hurl file that doesn't leak cookie: ```hurl GET http://localhost:8000/follow-redirect-basic-auth?change_host=true Cookie: fruit=lemon HTTP 200 ``` ## Patch With Hurl <= 8.0.1, user can use `Cookie` header instead of the dedicated `[Cookies]` section.
## The Bug Hurl <= 8.0.1 lets you define cookies two ways in a .hurl file: 1. As a raw Cookie: header in the [Header]/headers area 2. In a dedicated [Cookies] section (parsed into RequestSpec.cookies) When following a redirect to a different host, Hurl correctly strips security-sensitive data (Authorization, Cookie header, and basic-auth user) to avoid leaking credentials cross-host — mirroring libcurl's default behavior. But it only stripped the cookie that came in as a header. Cookies declared in the [Cookies] section were carried over to the new host unchanged — a credential-leak bug. Hurl file that leaks cookies: ```hurl GET http://localhost:8000/follow-redirect-basic-auth?change_host=true [Cookies] fruit: lemon HTTP 200 ``` Hurl file that doesn't leak cookie: ```hurl GET http://localhost:8000/follow-redirect-basic-auth?change_host=true Cookie: fruit=lemon HTTP 200 ``` ## Patch With Hurl <= 8.0.1, user can use `Cookie` header instead of the dedicated `[Cookies]` section.
Hurl es una herramienta de línea de comandos que ejecuta y prueba solicitudes HTTP definidas en archivos de texto plano. En la versión 8.0.1 y anteriores, el manejo de redirecciones en packages/hurl/src/http/client.rs elimina los encabezados Autorización y Cookie y las credenciales de autenticación básica cuando una redirección cambia de host, pero lleva las RequestSpec.cookies creadas a partir de la sección dedicada [Cookies] a la solicitud redirigida. Una redirección controlada por un atacante puede, por lo tanto, recibir cookies de autenticación o de sesión que deberían permanecer dentro del ámbito del host original. Las cookies proporcionadas a través de un encabezado Cookie sin procesar son eliminadas y no se ven afectadas por esta ruta específica. Este problema se informa como solucionado en la versión 8.1.0.
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 4.0 | Primary | cve.org | 6.9 | — | — | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| 4.0 | Primary | cve.org | 6.9 | — | — |
| CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| 4.0 | Secondary | GHSA | 6.9 | — | — | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| 4.0 | Secondary | ENISA EUVD | 6.9 | — | — | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| 4.0 | Secondary | NVD | 6.9 | — | — | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |