{"id":"CVE-2025-50181","aliases":["CVE-2025-50181","GHSA-pq67-6m6q-mj2v","PYSEC-2026-1999"],"related":[],"kind":"vulnerability","state":"published","title":"urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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:\n\n```python\nresp = urllib3.request(\"GET\", \"https://httpbin.org/redirect/1\", redirect=False)\nprint(resp.status)\n# 302\n```\n\nHowever, it is also possible to disable redirects, for all requests, by instantiating a `PoolManager` and specifying `retries` in a way that disable redirects:\n\n```python\nimport urllib3\n\nhttp = urllib3.PoolManager(retries=0)  # should raise MaxRetryError on redirect\nhttp = urllib3.PoolManager(retries=urllib3.Retry(redirect=0))  # equivalent to the above\nhttp = urllib3.PoolManager(retries=False)  # should return the first response\n\nresp = http.request(\"GET\", \"https://httpbin.org/redirect/1\")\n```\n\nHowever, the `retries` parameter is currently ignored, which means all the above examples don't disable redirects.\n\n## Affected usages\n\nPassing `retries` on `PoolManager` instantiation to disable redirects or restrict their number.\n\nBy default, requests and botocore users are not affected.\n\n## Impact\n\nRedirects 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.\n\n## Remediation\n\nYou can remediate this vulnerability with the following steps:\n\n * 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](mailto:sethmichaellarson@gmail.com) to discuss sponsorship or contribution opportunities.\n * Disable redirects at the `request()` level instead of the `PoolManager()` level.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-06-18T17:50:00.000Z","modified":"2026-09-10T03:50:25.299Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"< 2.5.0","status":"affected"}],"vendor":"urllib3","product":"urllib3","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.0"}],"ecosystem":"PyPI","package":"urllib3","purl":"pkg:pypi/urllib3","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.5.0"}],"vendor":"python","product":"urllib3","cpe":"cpe:2.3:a:python:urllib3:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.5.0"}],"ecosystem":"PyPI","package":"urllib3","purl":"pkg:pypi/urllib3","source":"pysec"}],"references":[{"url":"https://github.com/urllib3/urllib3/security/advisories/GHSA-pq67-6m6q-mj2v","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/urllib3/urllib3/commit/f05b1329126d5be6de501f9d1e3e36738bc08857","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/urllib3/urllib3/releases/tag/2.5.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-50181","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/urllib3/urllib3","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/urllib3","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-pq67-6m6q-mj2v","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-06-23T16:45:50.408Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-50181","url":"https://www.cve.org/CVERecord?id=CVE-2025-50181","licence":"CVE Terms of Use","modified":"2025-12-22T18:44:17.668Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pq67-6m6q-mj2v","url":"https://github.com/advisories/GHSA-pq67-6m6q-mj2v","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:25.299Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-50181","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-50181","licence":"Public domain","modified":"2026-06-17T09:34:48.843Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1999","url":"https://osv.dev/vulnerability/PYSEC-2026-1999","licence":"CC-BY-4.0","modified":"2026-07-07T17:47:54.161Z"}],"updatedAt":"2026-11-25T22:58:59.391Z","epss":{"score":0.00494,"percentile":0.4403,"date":"2026-12-01T12:00:22.000Z"}}