5.3medium
urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.49% (higher than 44% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-pq67-6m6q-mj2vPYSEC-2026-1999
Description
urllib3 is a user-friendly HTTP client library for Python. Prior to 2.5.0, it is possible to disable redirects for all requests by instantiating a PoolManager and specifying retries in a way that disable redirects. By default, requests and botocore users are not affected. An application attempting to mitigate SSRF or open redirect vulnerabilities by disabling redirects at the PoolManager level will remain vulnerable. This issue has been patched in version 2.5.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| urllib3 urllib3 | < 2.5.0 | CVE List |
| urllib3 (PyPI) | before 2.5.0 | GitHub Advisory Database, PyPA Advisory Database |
| python urllib3 | before 2.5.0 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| PyPA Advisory Database | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
urllib3 is a user-friendly HTTP client library for Python. Prior to 2.5.0, it is possible to disable redirects for all requests by instantiating a PoolManager and specifying retries in a way that disable redirects. By default, requests and botocore users are not affected. An application attempting to mitigate SSRF or open redirect vulnerabilities by disabling redirects at the PoolManager level will remain vulnerable. This issue has been patched in version 2.5.0.
GitHub Advisory Database
urllib3 handles redirects and retries using the same mechanism, which is controlled by the Retry object. The most common way to disable redirects is at the request level, as follows:
resp = urllib3.request("GET", "https://httpbin.org/redirect/1", redirect=False)
print(resp.status)
# 302
However, it is also possible to disable redirects, for all requests, by instantiating a PoolManager and specifying retries in a way that disable redirects:
import urllib3
http = urllib3.PoolManager(retries=0) # should raise MaxRetryError on redirect
http = urllib3.PoolManager(retries=urllib3.Retry(redirect=0)) # equivalent to the above
http = urllib3.PoolManager(retries=False) # should return the first response
resp = http.request("GET", "https://httpbin.org/redirect/1")
However, the retries parameter is currently ignored, which means all the above examples don't disable redirects.
Affected usages
Passing retries on PoolManager instantiation to disable redirects or restrict their number.
By default, requests and botocore users are not affected.
Impact
Redirects are often used to exploit SSRF vulnerabilities. An application attempting to mitigate SSRF or open redirect vulnerabilities by disabling redirects at the PoolManager level will remain vulnerable.
Remediation
You can remediate this vulnerability with the following steps:
- Upgrade to a patched version of urllib3. If your organization would benefit from the continued support of urllib3 1.x, please contact sethmichaellarson@gmail.com to discuss sponsorship or contribution opportunities.
- Disable redirects at the
request()level instead of thePoolManager()level.
NVD (es)
urllib3 es una librería cliente HTTP intuitiva para Python. Antes de la versión 2.5.0, era posible deshabilitar las redirecciones para todas las solicitudes instanciando un PoolManager y especificando reintentos para deshabilitarlas. Por defecto, las solicitudes y los usuarios de botocore no se ven afectados. Una aplicación que intente mitigar vulnerabilidades de SSRF o de redirección abierta deshabilitando las redirecciones a nivel de PoolManager seguirá siendo vulnerable. Este problema se ha corregido en la versión 2.5.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-50181 changed 2025-12-22 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-pq67-6m6q-mj2v changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2025-50181 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1999 changed 2026-07-07 | CC-BY-4.0 |