CVE-2024-42353: WebOb's location header normalization during redirect leads to open redirect

CVE-2024-42353 · Severity: low · CVSS 3.1 · Published 2024-08-14

WebOb provides objects for HTTP requests and responses. 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 urlparse, and joining it to the base URL. `urlparse` 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. This vulnerability is patched in WebOb version 1.8.8.

Technologies: webob (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2024-42353 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2024-42353 being exploited in the wild.
How severe is CVE-2024-42353?
Low severity, with a CVSS score of 3.1, published 14 August 2024.
Which products and versions are affected?
webob (PyPI) ECOSYSTEM:introduced=0,fixed=1.8.8, GIT:introduced=0,fixed=f689bcf4f0a1f64f1735b1d5069aef5be6974b5b|ECOSYSTEM:introduced=0,fixed=1.8.8.
Is there a fix for CVE-2024-42353?
Yes. webob (PyPI): upgrade to 1.8.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2024-42353?
Check whether you run webob (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • webob (PyPI): upgrade to 1.8.8 or later
    pip install "webob>=1.8.8"

Affected products

  • webob (PyPI) ECOSYSTEM:introduced=0,fixed=1.8.8, GIT:introduced=0,fixed=f689bcf4f0a1f64f1735b1d5069aef5be6974b5b|ECOSYSTEM:introduced=0,fixed=1.8.8

Identifiers

  • CVE-2024-42353
  • GHSA-mg3v-6m49-jhp3
  • PYSEC-2024-188

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.