CWE
200
Advisory Published
Advisory Published
Updated

CVE-2023-45803: Request body not stripped after redirect in urllib3

First published: Tue Oct 17 2023(Updated: )

A flaw found in the urllib3. The urllib3 is a user-friendly HTTP client library for Python. urllib3 previously wouldn't remove the HTTP request body when an HTTP redirect response using status 301, 302, or 303 after the request had its method changed from one that could accept a request body (like `POST`) to `GET` as is required by HTTP RFCs. Although this behavior is not specified in the section for redirects, it can be inferred by piecing together information from different sections and we have observed the behavior in other major HTTP client implementations like curl and web browsers. Because the vulnerability requires a previously trusted service to become compromised in order to have an impact on confidentiality we believe the exploitability of this vulnerability is low. Additionally, many users aren't putting sensitive data in HTTP request bodies, if this is the case then this vulnerability isn't exploitable. Both of the following conditions must be true to be affected by this vulnerability: 1. Using urllib3 and submitting sensitive information in the HTTP request body (such as form data or JSON) and 2. The origin service is compromised and starts redirecting using 301, 302, or 303 to a malicious peer or the redirected-to service becomes compromised. This issue has been addressed in versions 1.26.18 and 2.0.7 and users are advised to update to resolve this issue. Users unable to update should disable redirects for services that aren't expecting to respond with redirects with `redirects=False` and disable automatic redirects with `redirects=False` and handle 301, 302, and 303 redirects manually by stripping the HTTP request body. References: <a href="https://github.com/urllib3/urllib3/security/advisories/GHSA-g4mx-q9vg-27p4">https://github.com/urllib3/urllib3/security/advisories/GHSA-g4mx-q9vg-27p4</a> <a href="https://www.rfc-editor.org/rfc/rfc9110.html#name-get">https://www.rfc-editor.org/rfc/rfc9110.html#name-get</a> <a href="https://github.com/urllib3/urllib3/commit/4e98d57809dacab1cbe625fddeec1a290c478ea9">https://github.com/urllib3/urllib3/commit/4e98d57809dacab1cbe625fddeec1a290c478ea9</a>

Credit: security-advisories@github.com security-advisories@github.com security-advisories@github.com

Affected SoftwareAffected VersionHow to fix
Python urllib3<1.26.18
Python urllib3>=2.0.0<2.0.7
Fedoraproject Fedora=38
pip/urllib3>=0<1.26.18
1.26.18
pip/urllib3>=2.0.0<2.0.7
2.0.7
redhat/urllib3<2.0.7
2.0.7
<1.26.18
>=2.0.0<2.0.7
=38

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Frequently Asked Questions

  • What is CVE-2023-45803?

    CVE-2023-45803 is a vulnerability in urllib3 that allows an HTTP request body to remain after a method change to `GET` in a redirect response.

  • What is the severity of CVE-2023-45803?

    The severity of CVE-2023-45803 is medium with a CVSS score of 4.2.

  • How does CVE-2023-45803 affect the urllib3 package?

    CVE-2023-45803 affects urllib3 package versions 1.26.17 and earlier and versions 2.0.0 to 2.0.6. It has been fixed in version 1.26.18 and 2.0.7.

  • How can I fix CVE-2023-45803?

    To fix CVE-2023-45803, update the urllib3 package to version 1.26.18 or 2.0.7 using pip.

  • Where can I find more information about CVE-2023-45803?

    More information about CVE-2023-45803 can be found in the advisory and commits on the urllib3 GitHub repository: - Advisory: [here](https://github.com/urllib3/urllib3/security/advisories/GHSA-g4mx-q9vg-27p4) - Commit 1: [here](https://github.com/urllib3/urllib3/commit/4e50fbc5db74e32cabd5ccc1ab81fc103adfe0b3) - Commit 2: [here](https://github.com/urllib3/urllib3/commit/b594c5ceaca38e1ac215f916538fb128e3526a36)

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203