CVE-2023-43804: `Cookie` HTTP header isn't stripped on cross-origin redirects

Published Oct 2, 2023
·
Updated

Cookie HTTP header isn't stripped on cross-origin redirects

Other sources

urllib3 doesn't treat the Cookie HTTP header special or provide any helpers for managing cookies over HTTP, that is the responsibility of the user. However, it is possible for a user to specify a Cookie header and unknowingly leak information via HTTP redirects to a different origin if that user doesn't disable redirects explicitly.

Users must handle redirects themselves instead of relying on urllib3's automatic redirects to achieve safe processing of the Cookie header, thus we decided to strip the header by default in order to further protect users who aren't using the correct approach.

Affected usages

We believe the number of usages affected by this advisory is low. It requires all of the following to be true to be exploited:

Using an affected version of urllib3 (patched in v1.26.17 and v2.0.6) Using the Cookie header on requests, which is mostly typical for impersonating a browser. Not disabling HTTP redirects Either not using HTTPS or for the origin server to redirect to a malicious origin.

Remediation

Upgrading to at least urllib3 v1.26.17 or v2.0.6 Disabling HTTP redirects using redirects=False when sending requests. Not using the Cookie header.

GitHub

urllib3 is a user-friendly HTTP client library for Python. urllib3 doesn't treat the Cookie HTTP header special or provide any helpers for managing cookies over HTTP, that is the responsibility of the user. However, it is possible for a user to specify a Cookie header and unknowingly leak information via HTTP redirects to a different origin if that user doesn't disable redirects explicitly. This issue has been patched in urllib3 version 1.26.17 or 2.0.5.

NVD

Affected Software

16 affected componentsFixes available
pip/urllib3<1.26.17
1.26.17
pip/urllib3>=2.0.0<2.0.6
2.0.6
Python urllib3<1.26.17
Python urllib3>=2.0.0<2.0.6
Debian Debian Linux=10.0
Fedoraproject Fedora=37
Fedoraproject Fedora=38
Fedoraproject Fedora=39
redhat/urllib3<2.0.6
2.0.6
redhat/urllib3<1.26.17
1.26.17
IBM Watson Studio on Cloud Pak for Data<=4.0
IBM Watson Studio on Cloud Pak for Data<=5.0
Microsoft azl3 python-urllib3 2.0.7-1
Microsoft cbl2 python3 3.9.19-13
Microsoft azl3 python-urllib3 2.0.4-1
Microsoft cbl2 python-urllib3 1.26.18-1

Event History

Oct 2, 2023
Advisory Published
via GitHub·11:27 PM
Oct 4, 2023
CVE Published
via MITRE·04:01 PM
Data Sourced
via MITRE·04:01 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Oct 6, 2023
Data Sourced
via Red Hat·02:32 PM
DescriptionSeverityAffected Software
Oct 9, 2023
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
SeverityAffected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Aug 28, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID of this issue?

The vulnerability ID is CVE-2023-43804.

2

What is the severity of CVE-2023-43804?

The severity of CVE-2023-43804 is medium with a severity value of 5.9.

3

Which software is affected by CVE-2023-43804?

urllib3 versions up to 1.26.17 and versions up to 2.0.6 are affected by CVE-2023-43804.

4

How can I fix CVE-2023-43804?

To fix CVE-2023-43804, you should update urllib3 to version 1.26.17 or version 2.0.6.

5

Where can I find more information about CVE-2023-43804?

You can find more information about CVE-2023-43804 at the following references: [GitHub Advisory](https://github.com/urllib3/urllib3/security/advisories/GHSA-v845-jxx5-vc9f), [GitHub Commit 1](https://github.com/urllib3/urllib3/commit/01220354d389cd05474713f8c982d05c9b17aafb), [GitHub Commit 2](https://github.com/urllib3/urllib3/commit/644124ecd0b6e417c527191f866daa05a5a2056d).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203