CVE-2018-20060: urllib3 Authorization Header Exposure
Summary
CVE-2018-20060: urllib3 before version 1.23 does not remove the Authorization HTTP header when following a cross-origin redirect (i.e., a redirect that differs in host, port, or scheme). Affects urllib3 versions < 1.23. Fixed in 1.23. How to fix ↓
Also tracked for
- python-urllib3 · Debian:11
The same CVE-2018-20060 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
urllib3 is a Python library that provides a high-level interface for making HTTP requests. It is commonly used in various Python applications to handle network communication. This vulnerability affects urllib3 versions prior to 1.23. The library fails to remove the Authorization HTTP header when following a cross-origin redirect, which means that credentials included in the header can be exposed to unintended hosts or transmitted in cleartext.
Vulnerability Detail
The vulnerability in urllib3 arises from its failure to remove the Authorization header during a cross-origin redirect. This means that if a redirect occurs to a different host, port, or scheme, the Authorization header, which may contain sensitive credentials, will be sent to the new location. This can result in the exposure of credentials to unintended parties or the transmission of credentials in cleartext, posing a significant security risk.
How To Fix
Latest published version: 2.8.0 as of 23 Oct 2026
pip install --upgrade "urllib3==2.8.0"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.23
This is the first release that contains the fix.
pip install --upgrade "urllib3==1.23"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround provided for this vulnerability. Upgrading to the fixed version is the recommended solution.
Conclusion
The urllib3 library prior to version 1.23 is vulnerable to an Authorization header exposure issue during cross-origin redirects. This can result in the exposure of sensitive credentials or the transmission of credentials in cleartext. It is crucial for developers to upgrade to the fixed version to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for urllib3 →
FAQ
urllib3 is a Python library that provides a high-level interface for making HTTP requests. It is commonly used in various Python applications for network communication.
This vulnerability can lead to the exposure of credentials included in the Authorization header to unintended hosts or the transmission of credentials in cleartext.
Versions of urllib3 prior to 1.23 are affected by this vulnerability.
To fix this vulnerability, upgrade urllib3 to version 1.23 or later.
No specific workaround is available. Upgrading to the fixed version is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for urllib3.