CVE-2024-42353
mediumpriority · track · 24EPSS 0.006 · 47 %ileDEEURUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (20)
Products and version ranges known to be affected.
- Red Hat OpenStack Services on OpenShiftall versionscert_bundDEcpe:/a:redhat:openstack:services_on_openshift
advisories (3)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2024-2183Red Hat Enterprise Linux: Schwachstelle ermöglicht Darstellen falscher InformationenDeutsch2024-09-18csaf · cert_bundDE
Ein entfernter, anonymer Angreifer kann eine Schwachstelle in Red Hat Enterprise Linux und Red Hat OpenStack ausnutzen, um falsche Informationen darzustellen.
- GHSA-mg3v-6m49-jhp3WebOb's location header normalization during redirect leads to open redirect2024-08-14ghsa · osvUS
### 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 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. ``` >>> parse.urlparse("//example.com/test/path") ParseResult(scheme='', netloc='example.com', path='/test/path', params='', query='', fragment='') ``` WebOb uses `urljoin` to take the request URI and joining the redirect location, so assuming the request URI is: `https://example.org//example.com/some/path`, and the URL to redirect to (for example by adding a slash automatically) is `//example.com/some/path/` that gets turned by `urljoin` into: ``` >>> parse.urljoin("https://example.org//attacker.com/some/path", "//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 is patched in WebOb 1.8.8 Older versions of WebOb continue to be vulnerable to this issue, and should be avoided. ### 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. ### Thanks - Sara Gao This issue was reported via the [Pylons Project Security List](mailto:pylons-project-security@googlegroups.com)
- PYSEC-2024-1882024-08-14vendor · osvUS
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.
also known as (7)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (10)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2024-42353cnnvd
- https://cxsecurity.com/cveshow/CVE-2024-42353/cnnvd
- https://github.com/Pylons/webob/commit/f689bcf4f0a1f64f1735b1d5069aef5be6974b5bcnnvd
- https://github.com/Pylons/webob/releases/tag/1.8.8Patchcnnvd
- https://github.com/Pylons/webob/security/advisories/GHSA-mg3v-6m49-jhp3cnnvd
- https://vigilance.fr/vulnerability/WebOb-open-redirect-via-HTTP-Location-Header-Parsing-44980cnnvd
- https://github.com/Pylons/webob/commit/f689bcf4f0a1f64f1735b1d5069aef5be6974b5benisa_euvd
- https://github.com/Pylons/webob/security/advisories/GHSA-mg3v-6m49-jhp3enisa_euvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan