Skip to content

fix: patch eMudhra CA compromise (CVE-2026-111943) - #9

Merged
ivy merged 13 commits into
mainfrom
fix/emudhra-cve-2026-111943
Oct 24, 2026
Merged

ivy merged 13 commits into
mainfrom
fix/emudhra-cve-2026-111943

Conversation

@ivy

@ivy ivy commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Patches exposure to the eMudhra intermediate CA key compromise (CVE-2026-111943). Eight intermediates that chain to "emSign ECC Root CA - G3" (plus Sectigo cross-signs) have private keys that can be recovered.

Changes

  • Aider feature: certifi to >= 2026.10.19, pip to >= 26.2.2. Every aider-chat release pins an exact certifi below the fix. 0.86.2 (latest on PyPI) pins certifi==2026.1.4 and 0.86.0 pins 2025.8.3. 0.69.0 and 0.69.1 pin 2024.8.30 plus pip==24.3.1. After Aider and Playwright are installed, install.sh runs pipx runpip aider-chat install --upgrade 'certifi>=2026.10.19' 'pip>=26.2.2'. This covers the latest default, the 0.69.1 proposal and the 0.69.0 scenario. pip warns that this conflicts with Aider's exact pin. The override is intentional.
  • Aider feature: remove hf-xet. aider-chat 0.86.2 depends on hf-xet==1.2.0. That wheel compiles in webpki-roots 1.0.2 and rustls-webpki 0.103.4 (via reqwest/rustls-tls-webpki-roots), so it trusts the compromised intermediates no matter what the system store says. The tracker's fix is webpki-roots / webpki-root-certs 1.0.10 and rustls-webpki 0.103.16. No hf-xet release has these yet: 1.7.0 locks 1.0.6 / 0.103.15. install.sh now runs pipx runpip aider-chat uninstall -y hf-xet. huggingface_hub 1.4.1 checks is_package_available("hf_xet") and falls back to its regular HTTPS downloader, which uses the fixed certifi. On 0.69.x, where hf-xet is absent, the uninstall does nothing.
  • Aider feature: distro ca-certificates. On Debian and Ubuntu, install.sh runs apt-get install --only-upgrade ca-certificates before anything else. CI logs confirm 20250419+deb13u1 (trixie) and 20260816ubuntu0.26.04.1 (resolute) get installed. bookworm-security has 20250419~deb12u2.
  • Aider feature: Python 3.12 venv from uv 0.13.5. Every aider-chat release declares requires_python <3.13,>=3.10 (0.69.x: >=3.9). The python feature's os-provided default is 3.13.5 on trixie and 3.14.4 on Ubuntu 26.04, so pip backtracked to an ancient aider-chat with no Python bound and failed to build numpy==1.24.3. This broke all four Aider test jobs, on main as well. install.sh now runs uv 0.13.5 (fixed per the tracker) ephemerally through pipx: uv python install --no-bin 3.12.15, then pipx install --python "$(uv python find --managed-python 3.12.15)". Only Aider's venv uses it; the image's own Python and PATH are unchanged. pipx --fetch-missing-python was tried first and dropped: Debian's pipx 1.7.1 looks for a per-file .sha256 that python-build-standalone no longer publishes (HTTP 404), and it queries the unauthenticated GitHub releases API.
  • Aider feature: Python pinned to the patched 3.12.15 build. No CPython 3.12 release is on the fixed list, and Aider can't move to 3.13: every release requires <3.13, and 0.86.2 also pins numpy==1.26.4, which has no cp313 wheels. CPython's fix in 3.13.17, 3.14.9 and 3.15.1 is a bundled pip upgrade to 26.2.2 with certifi 2026.10.19 (release notes). python-build-standalone 20261021, which uv 0.13.5 installs for 3.12.15, ships the same pip and certifi in both site-packages and ensurepip/_bundled. I checked this on the macOS build and in the x86_64-unknown-linux-gnu tarball. A bare 3.12 request would reuse any older uv-managed 3.12 already on the image, so install.sh now pins 3.12.15.
  • Aider feature version bumped from 1.1.0 to 1.2.0, with a CHANGELOG entry.
  • Tests: test/aider/test.sh checks that certifi and pip in Aider's venv are at or above the fixed versions, and that hf_xet cannot be imported. A new check also covers the base interpreter's pip and its vendored certifi, plus the ensurepip wheel. Run against a venv built from macOS's system Python 3.9, the new check fails with ('21.2.4', ['21.2.4', '2021.05.30']).
  • CI: drop continue-on-error: true from the three test jobs. Those lines are on main too. They came from the devcontainers feature-starter template in the initial commit, not from a decision made here. Because of them, the test workflow concluded success even while every Aider job failed on main, which is how that breakage, and the CA checks that never ran, went unnoticed. Now a failing feature test fails the workflow run.
  • CI: Node 22.23.4 for the devcontainer CLI. The ubuntu-24.04 runner image (20261012) predates the fix and ships Node 22.23.3. test.yaml now runs actions/setup-node@v6 with node-version: 22.23.4 before npm install -g @devcontainers/cli. release.yaml and validate.yml get the same step before devcontainers/action@v1, because that action runs npm install -g @devcontainers/cli and then devcontainer from PATH, not on its own node24 runtime. This matters most for release.yaml, which publishes to ghcr.io with a packages: write token.
  • CI: runner ca-certificates. Every job now starts by running sudo apt-get install -y --only-upgrade ca-certificates. Runner image 20261012 was built before noble-security shipped 20260816ubuntu0.24.04.1 (2026-10-20), and dockerd pulls, git and curl on the host use that store. actions/checkout moves from v4 (node20, a line with no fix) to v5 (node24) in test.yaml, release.yaml and validate.yml.
  • Repo dev container: Node 20 to 22.23.4. The Node 20 line has no fixed release, so this moves to the nearest fixed line, 22. The image goes from javascript-node:1-20-bookworm (Node 20.19.2, built 2025-05-30) to javascript-node:5-22-bookworm. That tag pins the image major and points at the same digest as 22-bookworm. The newest build (2026-10-09) still ships Node 22.23.3, so ghcr.io/devcontainers/features/node:2 pins Node 22.23.4. Major 2 is the feature's current line. Its only breaking change is that yarn classic is no longer installed by default, and the image already ships yarn. updateContentCommand also upgrades ca-certificates, since the bookworm image ships 20230311.

Unresolved

  • Aider's Python is CPython 3.12.15, which is not on the fixed list. It carries the same bundled pip and certifi fix that 3.13.17 shipped (see above), and CI tests for it. Its OpenSSL loads the system store from /etc/ssl, which is upgraded. That default was checked on the macOS build, not inside the Linux containers.
  • Repo dev container before updateContentCommand. No javascript-node image has been built since 2026-10-20, as crane config shows. Until updateContentCommand runs, /usr/local/bin/node is 22.23.3 and the CA bundle is the old one. That window includes dockerd from docker-in-docker at container start. Once the image is rebuilt, this resolves itself.
  • The runner's bundled node24, which runs JavaScript actions, is 24.21.0 (runner 2.338.0). The fix is 24.22.1, which ships in runner 2.338.1 (2026-10-22). The repo can't pin it. This resolves when hosted runners pick up 2.338.1.
  • Playwright browser root stores not verified. The Chromium and Firefox builds are downloaded at install time, and their root stores can't be read as plain text. The tracker's fix for Firefox is NSS 3.131.1. Chromium is not on the tracker. The Node runtime inside the Playwright driver is 24.22.1, which is fixed.
  • Not checked: the Go version in the docker-in-docker binaries.
  • Not run locally in a container: Docker was unavailable, so the feature tests ran only in CI. All four Aider jobs now pass there, including the CA store and hf-xet checks. shellcheck, actionlint and JSON validation pass locally.

ivy added 13 commits October 23, 2026 13:48
Every aider-chat release, including 0.86.2, pins certifi (2026.1.4 or
older) and 0.69.x also pins pip 24.3.1. Both bundle CA stores that still
trust the eMudhra intermediates whose keys leaked (CVE-2026-111943), and
no aider release picks up the fixed certifi. Upgrade them in the pipx
venv after install, and upgrade the distro ca-certificates on Debian and
Ubuntu, since no devcontainers base image has been rebuilt since the fix.

https://emudhra.we-have-a-problem.com/
Node 20 has no fixed release for CVE-2026-111943, so move to the
nearest fixed line. The newest javascript-node:22-bookworm image
(2026-10-09) still ships Node 22.23.3 and ca-certificates without the
distrust, so pin Node through the node feature and upgrade
ca-certificates from bookworm-security on content update.

https://emudhra.we-have-a-problem.com/
hf-xet 1.2.0 compiles in webpki-roots 1.0.2, which still trusts the
compromised eMudhra intermediates (CVE-2026-111943) regardless of the
system store. No hf-xet release ships webpki-roots 1.0.10 yet, and
huggingface_hub treats the package as optional, so removing it is the
only fix available today.
The ubuntu-24.04 runner image predates the eMudhra fix and ships Node
22.23.3, and checkout@v4 targets node20, a line with no fix
(CVE-2026-111943). Pin setup-node to the fixed release and move
checkout to v5, which runs on node24.
The floating 22-bookworm tag can jump image majors silently; 5-22-bookworm
resolves to the same digest while keeping the major pin the old tag had.
devcontainers/action installs and runs @devcontainers/cli with the npm
and node on PATH, not its own node24 runtime. On the ubuntu-24.04 image
that is Node 22.23.3, which still trusts the compromised eMudhra
intermediates (CVE-2026-111943). The release job publishes to ghcr.io
with a packages:write token, so it must not run on that Node.
The ubuntu-24.04 runner image (20261012) was built before noble-security
shipped ca-certificates 20260816ubuntu0.24.04.1, so dockerd image pulls,
git and curl on the host still trust the compromised eMudhra
intermediates (CVE-2026-111943). Upgrading in place closes that until
the hosted image rolls over.
node:1 stopped at 1.7.1; the feature's current line is 2.x. The 2.0
break only drops the default yarn classic install, which the
javascript-node image already provides, and the version option and nvm
PATH are unchanged.
"Plain HTTP" read as unencrypted. Without hf-xet, huggingface_hub uses
its regular HTTPS downloader, which trusts the upgraded certifi.
Every aider-chat release, through 0.86.2, declares requires_python
<3.13. The python feature's os-provided default is 3.13.5 on trixie and
3.14.4 on Ubuntu 26.04, so pip backtracks to an ancient aider-chat with
no Python bound, fails to build numpy 1.24.3, and the feature never
installs. That broke all four aider test jobs on main as well, and meant
the eMudhra CA checks in test.sh had never run.

pipx --python 3.12 --fetch-missing-python uses a local 3.12 if present
and otherwise fetches a standalone build into PIPX_HOME, so only Aider's
venv changes and the image's own Python is left alone. No 3.12 release
is on the CVE-2026-111943 fixed list, but neither are the os-provided
3.13.5 and 3.14.4; trust inside the venv still comes from the upgraded
certifi, pip and system ca-certificates.
pipx --fetch-missing-python fails on Debian trixie, whose pipx is
1.7.1: it checks each python-build-standalone download against a
per-file .sha256 URL that the project no longer publishes, and gets a
404. Ubuntu 26.04 ships pipx 1.8.0 and was fine. pipx also resolves the
build through the unauthenticated GitHub releases API, which rate-limits
shared CI runners.

uv carries its Python download metadata and checksums in the binary,
and 0.13.5 is on the CVE-2026-111943 fixed list. Running uv ephemerally
through pipx keeps it out of the user's PATH, and --no-bin keeps
python3.12 out too. find --managed-python returns the minor-version
directory, which stays valid across 3.12 patch upgrades.
No CPython 3.12 release is on the CVE-2026-111943 fixed list, and every
aider-chat release requires Python <3.13 (0.86.2 also pins numpy 1.26.4,
which has no 3.13 wheels), so the fixed 3.13.17+ is not an option.

CPython's fix in 3.13.17/3.14.9/3.15.1 is a bundled pip upgrade to
26.2.2, which vendors certifi 2026.10.19. python-build-standalone
20261021, which uv 0.13.5 installs for 3.12.15, ships the same pip and
certifi in both site-packages and ensurepip. Requesting bare "3.12"
would reuse any older 3.12 build already managed by uv, so pin 3.12.15.

The new test checks the base interpreter's pip, its vendored certifi,
and the ensurepip wheel, not just the venv's upgraded copies.
continue-on-error: true came with the initial commit from the
devcontainers feature-starter template, not from any decision here. It
made the test workflow report success even when every test job failed,
which is how the aider jobs broke on main without the run going red and
how the eMudhra CA checks in test.sh went unexecuted. Each job's check
run still showed its own failure, but the workflow-level conclusion hid
it. The same three lines are on main.
@ivy
ivy merged commit f9e143c into main Oct 24, 2026
6 checks passed
@ivy
ivy deleted the fix/emudhra-cve-2026-111943 branch October 24, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant