CVE-2023-45803
Request body not stripped after redirect in urllib3
Also known as GHSA-g4mx-q9vg-27p4, PYSEC-2023-212
Mitigation
- Upgrade urllib3 to one of 2.0.7, 1.26.18 (or later in the same release line).
Who should check
- Projects that depend on PyPI package urllib3 (>= 2.0.0, < 2.0.7)
- Anyone running urllib3 >= 2.0.0, < 2.0.7; < 1.26.18
Vulnerability facts
- Affected
- urllib3 >= 2.0.0, < 2.0.7
- Fixed in
- 2.0.7, 1.26.18
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 4.2 (v3.1, CNA)CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Adjacent network
- Attack complexity: High
- Privileges required: High
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: None
- Availability impact: None
- EPSS
- 0.63% chance of exploitation in 30 days (percentile 44, 2026-11-26)
- CWE
- CWE-200
- Modified
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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-45803. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-45803.md Affected: urllib3 >= 2.0.0, < 2.0.7 Fixed in: 2.0.7, 1.26.18 Steps: 1. Search this machine and project for urllib3 (PyPI), urllib3: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
Other
- https://www.rfc-editor.org/rfc/rfc9110.html#name-get
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4R2Y5XK3WALSR3FNAGN7JBYV2B343ZKB/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5F5CUBAN5XMEBVBZPHFITBLMJV5FIJJ5/
- https://lists.debian.org/debian-lts-announce/2024/12/msg00020.html
- https://github.com/pypa/advisory-database/tree/main/vulns/urllib3/PYSEC-2023-212.yaml
- https://github.com/urllib3/urllib3
- https://github.com/urllib3/urllib3/releases/tag/1.26.18
- https://github.com/urllib3/urllib3/releases/tag/2.0.7
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4R2Y5XK3WALSR3FNAGN7JBYV2B343ZKB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5F5CUBAN5XMEBVBZPHFITBLMJV5FIJJ5
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PPDPLM6UUMN55ESPQWJFLLIZY4ZKCNRX
FAQ
Is CVE-2023-45803 being exploited?
There is no confirmed exploitation: CVE-2023-45803 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.63% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-45803?
Medium: CVSS 4.2 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2023-45803?
urllib3 >= 2.0.0, < 2.0.7.
Is there a fix for CVE-2023-45803?
Yes. Fixed in 2.0.7, 1.26.18. Upgrade urllib3 to one of 2.0.7, 1.26.18 (or later in the same release line).
How do I check if I'm affected by CVE-2023-45803?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.