CVE-2023-45803
Request body not stripped after redirect in urllib3
Check your servers for CVE-2023-45803
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-45803 affects urllib3, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N
- Attack vector
- adjacent: the attacker has to be on the same local network or link
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- high: the attacker needs an administrative account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity none, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.59%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 49.7% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 13 Sep 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
Affected products
As the CNA lists them.
Is my server affected?
Find the installed version of urllib3 and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i urllib3
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-45803 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-45803RHEL, Rocky, Alma, Fedora
rpm -q urllib3
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-45803Alpine
apk list --installed | grep -i urllib3With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-45803
trivy image --scanners vuln IMAGE | grep CVE-2023-45803
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
Other references
- https://github.com/urllib3/urllib3/commit/4e98d57809dacab1cbe625fddeec1a290c478ea9 github.com
- https://www.rfc-editor.org/rfc/rfc9110.html#name-get rfc-editor.org
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PPDPLM6UUMN55ESPQWJFLLIZY4ZKCNRX/ lists.fedoraproject.org
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4R2Y5XK3WALSR3FNAGN7JBYV2B343ZKB/ lists.fedoraproject.org
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5F5CUBAN5XMEBVBZPHFITBLMJV5FIJJ5/ lists.fedoraproject.org
- https://lists.debian.org/debian-lts-announce/2024/12/msg00020.html lists.debian.org
Source: the record CVE-2023-45803 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse