🛡️ CVE-2024-42353 — webob

🟡 CVSS 6.1 — Medium ⚠️ Exploit Public CWE-601 OSV
6.1
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

WebOb's location header normalization during redirect leads to open redirect

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:[email protected])

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. A user must actively cooperate. Rated impact: confidentiality none, integrity none, availability none.

Weakness class

CVE-2024-42353 is classified as CWE-601: Open Redirect. A redirect target is taken from user input, so a trusted link can send the visitor to an attacker's site.

Affected software

CVE-2024-42353 is recorded against 1 package.

  • webob (fixed in 1.8.8)

Timeline and source

Published on 14 August 2024 and last revised on 17 June 2026. A public exploit is known to exist, which raises the urgency of patching considerably. A vendor advisory or fix has been published. Record sourced from OSV.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)
github.com (Web)

CVE-2024-42353 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity MEDIUM
CVSS Score 6.1
CVSS Vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
CWE CWE-601
Public Exploit ⚠️ Yes
Source OSV
Published 2024-08-14
Updated 2026-08-12
Modified 2026-06-17

Affected Packages

Software From version Fixed in
webob 1.8.8

Similar Threats

Exploit Protection

Are you running webob?

CVE-2024-42353 carries CVSS 6.1 Medium rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2024-42353 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.