CVE-2023-45803 is a medium-severity (CVSS 4.2) Information Exposure vulnerability in urllib3. A fix is available for urllib3 — see the affected versions and patch details below.
Request body not stripped after redirect in urllib3
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2023-45803.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2023-45803 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
urllib3🐍urllib3Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
urllib3 previously wouldn't remove the HTTP request body when an HTTP redirect response using status 303 "See Other" 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 the behavior of removing the request body 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.
From RFC 9110 Section 9.3.1:
A client SHOULD NOT generate content in a GET request unless it is made directly to an origin server that has previously indicated, in or out of band, that such a request has a purpose and will be adequately supported.
Affected usages
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:
- If you're using urllib3 and submitting sensitive information in the HTTP request body (such as form data or JSON)
- The origin service is compromised and starts redirecting using 303 to a malicious peer or the redirected-to service becomes compromised.
Remediation
You can remediate this vulnerability with any of the following steps:
- Upgrade to a patched version of urllib3 (v1.26.18 or v2.0.7)
- Disable redirects for services that you aren't expecting to respond with redirects with
redirects=False. - Disable automatic redirects with
redirects=Falseand handle 303 redirects manually by stripping the HTTP request body.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | urllib3 | ≥ 2.0.0&&< 2.0.7 | 2.0.7pip install --upgrade 'urllib3==2.0.7' |
| 🐍PyPI | urllib3 | all versions | 1.26.18pip install --upgrade 'urllib3==1.26.18' |
Affected Products
fedorafedoraprojecturllib3pythonDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for urllib3, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update urllib3 to 2.0.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-45803 is resolved across your whole dependency graph.
Workarounds
Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
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 2. The origin service is compromised and starts redirecting using 301, 302, or 303 to a malicious peer or the redirected-to…
Users unable to update should disable redirects for services that aren't expecting to respond with redirects with `redirects=False`, disable automatic redirects with `redirects=False`, and handle 301, 302, and 303 redirects manually by stripping the HTTP request body.Source: Red Hat security advisory for CVE-2023-45803 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 8 | python3.11-urllib3-0:1.26.12-5.el8_10 | RHSA-2024:11189 |
| Red Hat Enterprise Linux 8 | fence-agents-0:4.2.1-129.el8 | RHSA-2024:2968 |
| Red Hat Enterprise Linux 8 | container-tools:rhel8-8100020240227110532.82888897 | RHSA-2024:2988 |
| Red Hat Enterprise Linux 8 | resource-agents-0:4.9.0-54.el8 | RHSA-2024:2952 |
| Red Hat Enterprise Linux 8 | python-urllib3-0:1.24.2-5.el8_9.2 | RHSA-2024:0116 |
| Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | fence-agents-0:4.2.1-65.el8_4.14 | RHBA-2024:1398 |
| Red Hat Enterprise Linux 8.6 Extended Update Support | fence-agents-0:4.2.1-89.el8_6.11 | RHBA-2024:1114 |
| Red Hat Enterprise Linux 8.6 Extended Update Support | python-urllib3-0:1.24.2-5.el8_6.1 | RHSA-2024:0300 |
Frequently Asked Questions
Is CVE-2023-45803 in your dependencies?
Find it across PyPI, including transitive dependencies.