Skip to main content

CVE-2023-43804 — Vulnerability in urllib3 — CVE Details

HIGH

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

Published October 2, 2023Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.52%). Schedule for your next planned update.

Does your project use an affected urllib3 version?

Paste your requirements.txt to check it for CVE-2023-43804 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my requirements.txt

Summary

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.

Advisory Timeline

  • First published October 2, 2023 (1150 days ago).
  • Last revised September 10, 2026 — 1073 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

pip
Update urllib3 to 2.0.6 or later
pip install "urllib3>=2.0.6"
pip
Update urllib3 to 1.26.17 or later
pip install "urllib3>=1.26.17"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: PyPI (1).

PackageFixed In
urllib3 PyPI · Affected: 2.0.0, 2.0.1, 2.0.2, 2.0.3 (+2 more)2.0.6
urllib3 PyPI · Affected: 0.2, 0.3, 0.3.1, 0.4.0 (+75 more)1.26.17

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-200
    Information ExposureMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N

Frequently Asked Questions

What is CVE-2023-43804?
`Cookie` HTTP header isn't stripped on cross-origin redirects. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 5.9/10).
How do I check if my project is affected by CVE-2023-43804?
CVE-2023-43804 affects urllib3. It has a 1.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2023-43804 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.9

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
1.52%
EPSS percentile: 74.9

This is an above-median EPSS score — 74.9% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-v845-jxx5-vc9f
PYSEC-2023-192

Related CVEs

  • CVE-2026-21441
    HIGH

    Decompression-bomb safeguards bypassed when following HTTP redirects (streaming API)

  • CVE-2025-66418
    HIGH

    urllib3 allows an unbounded number of links in the decompression chain

  • CVE-2026-97687
    HIGH

    urllib3: HTTPS proxy TLS configuration may be ignored or overridden

  • CVE-2026-97689
    HIGH

    urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory

  • CVE-2025-66471
    HIGH

    urllib3 streaming API improperly handles highly compressed data

  • CVE-2024-37891
    MEDIUM

    urllib3's Proxy-Authorization request header isn't stripped during cross-origin redirects

  • CVE-2025-50181
    MEDIUM

    urllib3 redirects are not disabled when retries are disabled on PoolManager instantiation

  • CVE-2026-97688
    MEDIUM

    urllib3: Chunked Deflate streaming can enter an infinite loop

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my requirements.txt