CVE-2023-45803 Request body not stripped after redirect in urllib3
Attackers can read sensitive request body data if a trusted service is compromised and redirects POST requests to GET without stripping the body.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-45803?
CVE-2023-45803 is a medium-severity vulnerability in Fedoraproject Fedora, published on 17 Oct 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
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.
Weakness: CWE-200
Which versions are affected by CVE-2023-45803?
5 open source packages ship an affected version, including urllib3. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
urllib3 PyPI | All versions | 1.26.18 |
urllib3 PyPI | All versions | 1.26.18 |
urllib3 PyPI | From 2.0.0 | 2.0.7, 1.26.18 |
urllib3 PyPI | From 2.0.0 | 2.0.7 |
urllib3 PyPI | From 2.0.0 | 2.0.7 |
Linux distribution packages (35)
python3.11-urllib3 AlmaLinux:8 | All versions | 1.26.12-5.el8_10 |
python3.11-urllib3 AlmaLinux:9 | All versions | 1.26.12-2.el9_5.2 |
python3.11-urllib3 Red Hat:enterprise_linux:8::appstream | All versions | 0:1.26.12-5.el8_10 |
python3.11-urllib3 Red Hat:enterprise_linux:9::appstream | All versions | 0:1.26.12-2.el9_5.2 |
python-urllib3 Red Hat:openstack:17.1::el8 | All versions | 0:1.25.10-6.el8ost |
python3-urllib3 Red Hat:openstack:17.1::el8 | All versions | 0:1.25.10-6.el8ost |
python3.11-urllib3 Red Hat:rhel_eus:8.8::appstream | All versions | 0:1.26.12-1.el8_8.2 |
resource-agents Red Hat:rhel_eus:8.8::highavailability | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-aliyun Red Hat:rhel_eus:8.8::highavailability | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-aliyun-debuginfo Red Hat:rhel_eus:8.8::highavailability | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-debuginfo Red Hat:rhel_eus:8.8::highavailability | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-debugsource Red Hat:rhel_eus:8.8::highavailability | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-gcp Red Hat:rhel_eus:8.8::highavailability | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-paf Red Hat:rhel_eus:8.8::highavailability | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents Red Hat:rhel_eus:8.8::resilientstorage | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-aliyun Red Hat:rhel_eus:8.8::resilientstorage | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-aliyun-debuginfo Red Hat:rhel_eus:8.8::resilientstorage | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-debuginfo Red Hat:rhel_eus:8.8::resilientstorage | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-debugsource Red Hat:rhel_eus:8.8::resilientstorage | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-gcp Red Hat:rhel_eus:8.8::resilientstorage | All versions | 0:4.9.0-40.el8_8.2 |
resource-agents-paf Red Hat:rhel_eus:8.8::resilientstorage | All versions | 0:4.9.0-40.el8_8.2 |
python3.11-urllib3 Red Hat:rhel_eus:9.2::appstream | All versions | 0:1.26.12-1.el9_2.1 |
python3.11-urllib3 Red Hat:rhel_eus:9.4::appstream | All versions | 0:1.26.12-2.el9_4.2 |
python3.11-urllib3 Rocky Linux:8 | All versions | 0:1.26.12-5.el8_10 |
python3.11-urllib3 Rocky Linux:9 | All versions | 0:1.26.12-2.el9_5.2 |
python-urllib3 SUSE:HPE Helion OpenStack 8 | All versions | 1.25.10-5.25.1 |
python-urllib3 SUSE:Linux Enterprise Micro 5.1 | All versions | 1.25.10-150300.4.9.1 |
python-urllib3 SUSE:Linux Enterprise Micro 5.2 | All versions | 1.25.10-150300.4.9.1 |
python-urllib3 SUSE:Linux Enterprise Micro 5.3 | All versions | 1.25.10-150300.4.9.1 |
python-urllib3 SUSE:Linux Enterprise Micro 5.4 | All versions | 1.25.10-150300.4.9.1 |
python-urllib3 SUSE:Linux Enterprise Micro 5.5 | All versions | 1.25.10-150300.4.9.1 |
python-urllib3 SUSE:Linux Enterprise Micro 5.5 | All versions | 1.25.10-150300.4.9.1 |
python-urllib3 SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 1.25.10-150300.4.9.1 |
python-urllib3 SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 1.25.10-150300.4.9.1 |
python-urllib3 SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 1.25.10-3.37.1 |
Products include Fedoraproject Fedora, Python Urllib3.
How do I fix CVE-2023-45803?
Upgrade urllib3 to a fixed version for your release line: 1.26.18 or 2.0.7.
Is CVE-2023-45803 being exploited?
There is no known exploitation of CVE-2023-45803 in the wild and no public exploit code.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as ALPINE-CVE-2023-45803, ALSA-2024:11189, ALSA-2024:11238, AZL-31615, AZL-35445, AZL-35785 and 29 more.