requests SSLError: CERTIFICATE_VERIFY_FAILED because certifi is outdated (missing a new root CA)
An old certifi bundle doesn't contain the root that now signs the site's certificate.
requests.exceptions.SSLError: HTTPSConnectionPool certificate verify failed certificould not find a suitable TLS CA certificate bundle, invalid pathcertifi outdated CA bundleOSError: Could not find a suitable TLS CA certificate bundle, invalid pathREQUESTS_CA_BUNDLE invalid path Meaning
Update certifi and requests, avoid pinning ancient versions in requirements.txt, and check for REQUESTS_CA_BUNDLE/CURL_CA_BUNDLE overrides pointing at an old file. The Let's Encrypt root change (ISRG Root X1) broke many old bundles.
Common causes
- Old pinned
certifi - Container image with stale packages
- REQUESTS_CA_BUNDLE pointing at an old bundle
- Python 2/old requests
- Corporate proxy root missing
⚡ Quick fix
pip install -U certifi requests- Check
python -m certifipath and env overrides - Rebuild images regularly
Detailed fix by platform
Shell
- bash
pip install -U certifi requests python -c "import certifi; print(certifi.where())"
How to diagnose
- certifi — Current?
- Env override — Present?
- Image — Stale?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in SSL / TLS
- Keystore was tampered with, or password was incorrect Java keytool: java.io.IOException: Keystore was tampered with, or password was incorrect
- Challenge failed for domain Let’s Encrypt / Certbot: Challenge failed for domain example.com — Invalid response from http://example.com/.well-known/acme-challenge/x: 404
- SSLCertificateFile: file does not exist Apache: AH02240: Server should be SSL-aware but has no certificate configured / SSLCertificateFile: file '/etc/ssl/x.crt' does not exist or is empty
Other ways to find it
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 18 Nov 2026