Bug 2246840 (CVE-2023-45803) - CVE-2023-45803 urllib3: Request body not stripped after redirect from 303 status changes request method to GET
Summary: CVE-2023-45803 urllib3: Request body not stripped after redirect from 303 sta...
Keywords:
Status: NEW
Alias: CVE-2023-45803
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2250607 2252962 2247625 2247626 2247627 2247628 2250606 2252961 2252964 2252965
Blocks: 2244812
TreeView+ depends on / blocked
 
Reported: 2023-10-29 14:46 UTC by Alex
Modified: 2024-04-30 09:36 UTC (History)
71 users (show)

Fixed In Version: urllib3 2.0.7
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in urllib3, an HTTP client library for Python. urllib3 doesn't remove the HTTP request body when an HTTP redirect response using status 301, 302, or 303, after changing the method in a request from one that could accept a request body such as `POST` to `GET`, as is required by HTTP RFCs. This issue requires a previously trusted service to become compromised in order to have an impact on confidentiality, therefore, the exploitability of this vulnerability is low. Additionally, many users aren't putting sensitive data in HTTP request bodies; if this is the case, this vulnerability isn't exploitable.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2024:0375 0 None None None 2024-01-23 17:18:59 UTC
Red Hat Product Errata RHSA-2023:7851 0 None None None 2023-12-14 16:26:41 UTC
Red Hat Product Errata RHSA-2024:0116 0 None None None 2024-01-10 10:43:36 UTC
Red Hat Product Errata RHSA-2024:0300 0 None None None 2024-01-18 16:25:04 UTC
Red Hat Product Errata RHSA-2024:0464 0 None None None 2024-01-24 16:30:54 UTC
Red Hat Product Errata RHSA-2024:0588 0 None None None 2024-01-30 13:25:30 UTC
Red Hat Product Errata RHSA-2024:1155 0 None None None 2024-03-05 18:08:44 UTC
Red Hat Product Errata RHSA-2024:2132 0 None None None 2024-04-30 09:36:23 UTC

Description Alex 2023-10-29 14:46:04 UTC
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:
https://github.com/urllib3/urllib3/security/advisories/GHSA-g4mx-q9vg-27p4
https://www.rfc-editor.org/rfc/rfc9110.html#name-get
https://github.com/urllib3/urllib3/commit/4e98d57809dacab1cbe625fddeec1a290c478ea9

Comment 1 ybuenos 2023-11-02 12:47:25 UTC
Created python-urllib3 tracking bugs for this issue:

Affects: epel-all [bug 2247627]
Affects: fedora-all [bug 2247625]
Affects: openstack-rdo [bug 2247626]

Comment 13 errata-xmlrpc 2023-12-14 16:26:37 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.14 for RHEL 8

Via RHSA-2023:7851 https://access.redhat.com/errata/RHSA-2023:7851

Comment 14 errata-xmlrpc 2024-01-10 10:43:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:0116 https://access.redhat.com/errata/RHSA-2024:0116

Comment 18 errata-xmlrpc 2024-01-18 16:25:00 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2024:0300 https://access.redhat.com/errata/RHSA-2024:0300

Comment 19 errata-xmlrpc 2024-01-24 16:30:50 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:0464 https://access.redhat.com/errata/RHSA-2024:0464

Comment 20 errata-xmlrpc 2024-01-30 13:25:25 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Extended Update Support

Via RHSA-2024:0588 https://access.redhat.com/errata/RHSA-2024:0588

Comment 22 errata-xmlrpc 2024-03-05 18:08:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Extended Update Support

Via RHSA-2024:1155 https://access.redhat.com/errata/RHSA-2024:1155

Comment 27 errata-xmlrpc 2024-04-30 09:36:19 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:2132 https://access.redhat.com/errata/RHSA-2024:2132


Note You need to log in before you can comment on or make changes to this bug.