Jump to solution
Verify

The Fix

pip install urllib3==2.2.0

Based on closed urllib3/urllib3 issue #3325 · PR/commit linked

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Jump to Verify Open PR/Commit
@@ -0,0 +1 @@ @@ -0,0 +1 @@ +Fixed TLS 1.3 Post Handshake Auth when the server certificate validation was disabled. diff --git a/src/urllib3/util/ssl_.py b/src/urllib3/util/ssl_.py index e0a7c04a3c..b14cf27b61 100644
repro.py
import platform import ssl import urllib3 print("OS", platform.platform()) print("Python", platform.python_version()) print(ssl.OPENSSL_VERSION) print("urllib3", urllib3.__version__)
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install urllib3==2.2.0\nWhen NOT to use: Do not use this fix if server certificate validation is required.\n\n

Why This Fix Works in Production

  • Trigger: TLS 1.3 Post Handshake Auth no longer working with urllib 2.1.0 when ignoring cert validation
  • Mechanism: The change in the commit restricted post_handshake_auth to only when cert_reqs is CERT_REQUIRED
  • Why the fix works: Fixed TLS 1.3 Post Handshake Auth when the server certificate validation was disabled. (first fixed release: 2.2.0).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • Shows up under Python 3.7 in real deployments (not just unit tests).
  • The change in the commit restricted post_handshake_auth to only when cert_reqs is CERT_REQUIRED
  • Production symptom (often without a traceback): TLS 1.3 Post Handshake Auth no longer working with urllib 2.1.0 when ignoring cert validation

Proof / Evidence

  • GitHub issue: #3325
  • Fix PR: https://github.com/urllib3/urllib3/pull/3326
  • First fixed release: 2.2.0
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.75
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.70

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“Thank you for reporting this issue and opening a fix!”
@sethmlarson · 2024-01-29 · source

Failure Signature (Search String)

  • TLS 1.3 Post Handshake Auth no longer working with urllib 2.1.0 when ignoring cert validation
  • if (cert_reqs == ssl.CERT_REQUIRED or sys.version_info >= (3, 7, 4)) and getattr(
Copy-friendly signature
signature.txt
Failure Signature ----------------- TLS 1.3 Post Handshake Auth no longer working with urllib 2.1.0 when ignoring cert validation if (cert_reqs == ssl.CERT_REQUIRED or sys.version_info >= (3, 7, 4)) and getattr(

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- TLS 1.3 Post Handshake Auth no longer working with urllib 2.1.0 when ignoring cert validation if (cert_reqs == ssl.CERT_REQUIRED or sys.version_info >= (3, 7, 4)) and getattr(

Minimal Reproduction

repro.py
import platform import ssl import urllib3 print("OS", platform.platform()) print("Python", platform.python_version()) print(ssl.OPENSSL_VERSION) print("urllib3", urllib3.__version__)

Environment

  • Python: 3.7
  • urllib3: 2.1.0

What Broke

Authentication fails and the TLS socket is closed by the server due to missing client certificate.

Why It Broke

The change in the commit restricted post_handshake_auth to only when cert_reqs is CERT_REQUIRED

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install urllib3==2.2.0

When NOT to use: Do not use this fix if server certificate validation is required.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/urllib3/urllib3/pull/3326

First fixed release: 2.2.0

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • Do not use this fix if server certificate validation is required.

Verify Fix

verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.

Did This Fix Work in Your Case?

Quick signal helps us prioritize which fixes to verify and improve.

Prevention

  • Add a CI check that diffs key outputs after upgrades (OpenAPI schema snapshots, JSON payload shapes, CLI output).
  • Upgrade behind a canary and run integration tests against the canary before 100% rollout.
  • Add a TLS smoke test that performs a real handshake in CI (include CA bundle validation and hostname checks).
  • Alert on handshake failures by error string and endpoint to catch cert/CA changes quickly.

Version Compatibility Table

VersionStatus
2.2.0 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.