The short answer: this is real, and it’s serious, but it isn’t a bug in Python itself. A certificate authority’s keys were compromised, and Python tools that carry their own list of trusted CAs kept trusting it. Upgrade certifi to 2026.10.19, pip to 26.2.2 and uv to 0.13.4 or later in every environment, then rebuild your container images. Updating the operating system alone does not fix pip.
On October 20, 2026, the Python Software Foundation’s security team published a critical advisory for certifi, the package that supplies the CA bundle most Python HTTPS clients use. Seth Larson’s guidance on discuss.python.org warns that skipping the update “could result in monster-in-the-middle (MITM) attacks against TLS clients, including python.org and pypi.org.” Posts on X have since called it a Python emergency. The facts below come from the official advisories.
This guide covers what happened, whether you’re affected, how to find every Python install you run, what to do in the first 24 hours, and how to get off Python versions that can’t get the fix the easy way. Last week we wrote about php2shell. This one is different: no code runs on your servers, but an attacker on the network path could make your Python tools trust the wrong server.
What actually happened?
eMudhra, a certificate authority, had eight intermediate CA certificates chaining to its emSign root with compromised private keys, and the CA has revoked them, according to uv’s advisory. An attacker holding one of those keys can issue certificates that a vulnerable client accepts for any hostname.
Browsers and operating systems update their trust stores on their own schedule. Many Python tools don’t use only the system store; they ship their own:
- certifi bundles a copy of trusted root certificates. Versions from 2019.03.09 onward include the emSign roots, per the certifi advisory (GHSA-6q48-6c7w-9gw2), rated critical.
- pip vendors its own copy of certifi.
- uv vendors its own root bundle; versions before 0.13.4 include the
emSign ECC Root CA - G3root.
Am I affected?
Almost certainly, if you use Python with pip, uv, conda or any library that relies on certifi. The PSF lists these minimum safe versions:
| Package | Upgrade to at least |
|---|---|
| certifi | 2026.10.19 |
| pip | 26.2.2 |
| uv | 0.13.4 (0.13.5 adds more, see below) |
| sigstore | 4.5.1 |
| conda | 26.9.4 |
| pixi | 0.82.1 |
The certifi advisory names 2026.10.18 as the first patched release, but the PSF recommends 2026.10.19 for compatibility with emSign root certificates that weren’t affected.
Why an OS update isn’t enough for pip. A follow-up in the same PSF thread explains that pip always loads its vendored certifi in addition to the system trust store, and there’s no supported way to turn that off. Any pip older than 26.2.2 keeps trusting the compromised CAs no matter what your OS trusts.
uv 0.13.5 (released Oct 21) goes further: per the uv changelog, it rejects certificate chains containing the compromised eMudhra intermediate keys, and its managed CPython builds now ship pip 26.2.2 with certifi 2026.10.19.
How do we find every Python install we run?
Python hides in more places than most teams expect. Check:
- Every virtual environment. Each venv has its own pip and often its own certifi. Run
python -m pip --versionandpython -m pip show certifiinside each one. Upgrading the system pip doesn’t touch them. - Container images. Images keep the pip and CA bundle they were built with. The PSF recommends rebuilding with layer caching disabled so you pick up the latest system certificates too.
- CI runners and build images, which often install packages from PyPI, the exact traffic an attacker would want to intercept.
- The python.org macOS installer, which includes its own certifi bundle. The PSF thread gives the exact commands to update it.
- uv-managed Pythons. After upgrading uv, run
uv python upgrade. Virtual environments pinned to an older patch version don’t switch automatically, so upgrade pip in those separately. - conda and pixi environments, which have their own minimum versions in the table above.
- Vendor products and appliances that ship Python inside. Ask the vendor whether their bundle has been updated.
What should we do in the first 24 hours?
- Update pip safely. Upgrading over a connection you can’t fully trust is exactly the risk here. The PSF thread provides a
pip installcommand that pins the pip 26.2.2 wheel by SHA-256 hash, so the download is checked even if TLS can’t be trusted. Use it, then use the new pip to upgrade certifi. - Update uv. The PSF thread suggests
UV_SYSTEM_CERTS=true uv self update, which uses your OS trust store (already updated on macOS and Windows; check your Linux distribution) instead of uv’s embedded one. - Upgrade certifi, sigstore, conda and pixi to the versions in the table.
- Rebuild and redeploy container images with layer caching disabled.
- Update lock files and pinned requirements so the next build doesn’t reinstall an old certifi.
- Review high-value outbound connections. The advisories we read don’t report active exploitation, but if your Python services talk to payment, identity or internal APIs over networks you don’t control, check for odd certificate issuers in your TLS logs.
Not sure where all your Python lives? We run fast Python supply-chain audits: we find every interpreter, virtual environment and container image across your systems, check pip, certifi and uv versions, update and rebuild what’s out of date, and pin your installs by hash so the next incident is smaller. Book a call and we’ll start with your CI and production images.
We’re stuck on Python 3.9 or 3.10. Now what?
This is where the incident gets harder. Per the uv changelog, upstream CPython 3.9 and 3.10 still bundle pip releases whose certificate bundles trust the affected emSign root. Astral has stopped publishing uv Docker images based on Python 3.9 and 3.10. And according to Python Insider, Python 3.10.22, released October 1, 2026, was the final 3.10 release: the series is end of life with no further security updates.
You can still upgrade pip and certifi inside a 3.9 or 3.10 environment, and you should do that today. But a fresh python -m venv on those versions will keep installing the old bundled pip, so every new environment starts out vulnerable. That’s a strong reason to move.
The supported targets: Python 3.11 gets security fixes until October 2027 and 3.12 until October 2028, and 3.13 and 3.14 are newer still (Python Insider). For anything you’ll run for more than a year, we’d aim for 3.12 or newer.
How do we upgrade Python safely?
We treat a Python upgrade like any other migration: inventory, test, move in stages.
- Inventory interpreters and dependencies. List each app’s Python version, its requirements or lock file, and any packages with C extensions, which are the most likely to need new versions.
- Pin and lock. Use a lock file with hashes so installs are reproducible and checked.
- Run your tests on the target version in CI before touching production. Add tests around integrations and data handling if coverage is thin.
- Upgrade dependencies in batches, starting with the ones that block the new Python version.
- Rebuild images on a supported base image and drop custom CA hacks you no longer need.
- Roll out in stages: staging, a slice of production, then everything, with the old image ready to roll back.
It’s the same approach we use for migrations without downtime, and the same lesson as php2shell: patching is easy on supported versions, and end-of-life runtimes are where incidents become projects.
FAQ
Is this a vulnerability in Python itself?
No. CPython’s code isn’t the problem. The issue is which certificate authorities Python tools trust. The fixes are in certifi, pip, uv and related tools, plus newer CPython builds that bundle the fixed pip.
Does updating my operating system fix it?
Not for pip. Any pip older than 26.2.2 keeps trusting the compromised CAs through its own bundled certifi. Update pip in every environment.
Do I need to rebuild Docker images?
Yes. The PSF recommends rebuilding container images, with layer caching disabled, so they pick up updated certificates and packages.
Are browsers affected?
The PSF thread notes that browsers should already have updated their certificate stores and revocation lists. This incident is about Python tools that ship their own CA bundles.
Was the X post accurate?
Mostly. The core claims match the official advisories: eight compromised CA keys, a risk of impersonating python.org and PyPI, OS patches not protecting older pip, and the need to update pip, certifi and uv and rebuild images. The framing as a “Python” hack overstates it; it’s a CA compromise that Python’s tooling had to respond to.
Where should we start?
Start with your build pipeline and production images, since that’s where packages are downloaded most often. Then work through every virtual environment and developer machine.
If you’re still running Python 3.9 or 3.10, this is a good moment to plan the move to a supported version. Our legacy modernization services cover Python and other runtime upgrades from inventory through staged rollout. Book a call and bring a rough list of your apps and their Python versions.