CVE-2026-44889
JSON

6.1medium

WebOb: Location header normalization during redirect leads to open redirect

Severity
6.1medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.21% (higher than 11% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-fh3h-vg37-cc95PYSEC-2026-251

Description

WebOb provides objects for HTTP requests and responses. Prior to 1.8.10, the normalization of the HTTP Location header during a redirect is vulnerable to an open redirect: WebOb joins the redirect target to the request URI using Python's urljoin, and since Python 3.10 the underlying urlsplit strips ASCII tab, carriage return, and newline characters before parsing, so a redirect target containing such characters can be reinterpreted as a protocol-relative URL whose authority is an attacker-controlled host. This bypasses the CVE-2024-42353 fix that escaped a leading double slash, allowing an attacker who influences the redirect location to send users to an arbitrary external site instead of the intended one. This vulnerability is fixed in 1.8.10.

Affected

Product or packageVersionsReported by
Pylons webob< 1.8.10CVE List
webob (PyPI)before 1.8.10GitHub Advisory Database, PyPA Advisory Database
pylonsproject webobbefore 1.8.10NVD

All scores

GitHub_M6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
PyPA Advisory Database6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-601

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

WebOb provides objects for HTTP requests and responses. Prior to 1.8.10, the normalization of the HTTP Location header during a redirect is vulnerable to an open redirect: WebOb joins the redirect target to the request URI using Python's urljoin, and since Python 3.10 the underlying urlsplit strips ASCII tab, carriage return, and newline characters before parsing, so a redirect target containing such characters can be reinterpreted as a protocol-relative URL whose authority is an attacker-controlled host. This bypasses the CVE-2024-42353 fix that escaped a leading double slash, allowing an attacker who influences the redirect location to send users to an arbitrary external site instead of the intended one. This vulnerability is fixed in 1.8.10.

GitHub Advisory Database
Impact

When WebOb normalizes the HTTP Location header to include the request hostname, it does so by parsing the URL that the user is to be redirected to with Python's urllib.parse, and joining it to the base URL. urlsplit (called internally by urljoin) however treats a // at the start of a string as a URI without a scheme, and then treats the next part as the hostname. urljoin will then use that hostname from the second part as the hostname replacing the original one from the request.

In a previous advisory https://github.com/Pylons/webob/security/advisories/GHSA-mg3v-6m49-jhp3 an attempt to fix this was made by forcing the replacement of // with /%2f, however this did not take into account that since Python 3.10 urlsplit internally strips ASCII tab, carriage return, and newline characters from the string, so /\t/attacker.com gets turned into //attacker.com and the attacker is able to bypass the changes introduced in that previous advisory, thereby bringing back the problem that was attempted to be fixed.

>>> parse.urlparse("//attacker.com/some/path")
ParseResult(scheme='', netloc='attacker.com', path='/some/path', params='', query='', fragment='')

WebOb uses urljoin to take the request URI and join the redirect location to it, so assuming the request URI is https://example.org/ and the URL to redirect to is /\t/attacker.com/some/path/:

>>> parse.urljoin("https://example.org/", "/\t/attacker.com/some/path/")
'https://attacker.com/some/path/'

Which redirects from example.org where we want the user to stay to attacker.com.

Patches

This issue has been fixed in WebOb 1.8.10.

Workarounds

Any use of the Response class that includes a location can be rewritten to make sure to always pass a full URI that includes the hostname to redirect the user to, or to validate that the redirect target starts with a scheme (e.g. http:// or https://) before assigning to Response.location.

References
Thanks
  • Caleb Brown of Google
NVD (es)

WebOb proporciona objetos para solicitudes y respuestas HTTP. Antes de la versión 1.8.10, la normalización del encabezado HTTP Location durante una redirección es vulnerable a una redirección abierta: WebOb une el objetivo de la redirección a la URI de la solicitud usando urljoin de Python, y desde Python 3.10 el urlsplit subyacente elimina los caracteres ASCII de tabulación, retorno de carro y nueva línea antes del análisis, por lo que un objetivo de redirección que contenga dichos caracteres puede ser reinterpretado como una URL relativa al protocolo cuya autoridad es un host controlado por un atacante. Esto elude la corrección de CVE-2024-42353 que escapaba una doble barra inicial, permitiendo a un atacante que influye en la ubicación de la redirección enviar a los usuarios a un sitio externo arbitrario en lugar del previsto. Esta vulnerabilidad se corrige en la versión 1.8.10.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-44889 changed 2026-06-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-fh3h-vg37-cc95 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-44889 changed 2026-10-25Public domain
PyPA Advisory DatabasePYSEC-2026-251 changed 2026-06-27CC-BY-4.0