Bug 2246840 (CVE-2023-45803)

Summary: CVE-2023-45803 urllib3: Request body not stripped after redirect from 303 status changes request method to GET
Product: [Other] Security Response Reporter: Alex <allarkin>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: adudiak, agarcial, aoconnor, apatel, apevec, asegurap, bbuckingham, bcourt, bdettelb, caswilli, cstratak, davidn, dfreiber, dhalasz, dkuc, eglynn, ehelms, epacific, fdupont, fjansen, gsuckevi, hhorak, hkataria, jburrell, jcammara, jhardy, jjoyce, jkoehler, jmitchel, jneedle, jobarker, jorton, jsamir, jschluet, jsherril, jtanner, kaycoth, kgaikwad, kshier, lhh, luizcosta, lzap, mabashia, mburns, mgarciac, mhulan, mresvani, nmoumoul, nweather, omaciel, orabin, osapryki, pcreech, pgrist, psegedy, python-maint, rbobbitt, rchan, rhos-maint, rogbas, simaishi, smcdonal, stcannon, sthirugn, supatil, teagle, tfister, torsava, tsweeney, vkrizan, vkumar, vmugicag, yguenane, zsadeh
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2250607, 2247625, 2247626, 2247627, 2247628, 2250606, 2252961, 2252962, 2252964, 2252965    
Bug Blocks: 2244812    

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

Comment 28 errata-xmlrpc 2024-05-22 09:14:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 29 errata-xmlrpc 2024-05-22 09:23:28 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 30 errata-xmlrpc 2024-05-22 09:28:12 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 31 errata-xmlrpc 2024-05-22 20:34:59 UTC
This issue has been addressed in the following products:

  Red Hat OpenStack Platform 17.1 for RHEL 8

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