CVE-2018-20060: urllib3 Authorization Header Exposure

urllib3 Updated 02 Oct 2025

Summary

11/12/2018
Yes i
Critical
9.8

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for urllib3.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback