Jump to solution
Details

The Fix

pip install urllib3==1.26.16

Based on closed urllib3/urllib3 issue #3016 · 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%.

Open PR/Commit
@@ -1,6 +1,8 @@ =========== +.. automodule:: urllib3.connection + .. autoclass:: urllib3.connection.HTTPConnection
fix.md
Option A — Upgrade to fixed release\npip install urllib3==1.26.16\nWhen NOT to use: This fix is not applicable if the environment cannot upgrade OpenSSL or urllib3.\n\n

Why This Fix Works in Production

  • Trigger: ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with OpenSSL 1.0.2k-fips 26 Jan 2017. See:
  • Mechanism: Adds guidance for users encountering OpenSSL version issues when upgrading to urllib3 v2.0, specifically for Amazon Linux and RHEL.
  • Why the fix works: Adds guidance for users encountering OpenSSL version issues when upgrading to urllib3 v2.0, specifically for Amazon Linux and RHEL. (first fixed release: 1.26.16).
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

  • Triggered by an upgrade/regression window: 1.1.1 breaks; 1.26.16 is the first fixed release.
  • Surfaces as: ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with OpenSSL 1.0.2k-fips 26 Jan 2017. See:…

Proof / Evidence

  • GitHub issue: #3016
  • Fix PR: https://github.com/urllib3/urllib3/pull/3018
  • First fixed release: 1.26.16
  • Affected versions: 1.1.1
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.95
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.79

Discussion

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

“on amazon linux 2, openssl 1.1 is available as a different package named openssl11 this worked for me w/pyenv: 1. remove (or don't install) openssl-devel…”
@cmawhorter · 2023-05-04 · source

Failure Signature (Search String)

  • ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with OpenSSL 1.0.2k-fips 26 Jan 2017. See:

Error Message

Stack trace
error.txt
Error Message ------------- ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with OpenSSL 1.0.2k-fips 26 Jan 2017. See: https://github.com/urllib3/urllib3/issues/2168

Environment

  • urllib3: 2.0

Fix Options (Details)

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

pip install urllib3==1.26.16

When NOT to use: This fix is not applicable if the environment cannot upgrade OpenSSL or urllib3.

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/3018

First fixed release: 1.26.16

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

  • This fix is not applicable if the environment cannot upgrade OpenSSL or urllib3.

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
1.1.1 Broken
1.26.16 Fixed

Related Issues

No related fixes found.

Sources

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