Skip to content

Stop trusting the compromised eMudhra intermediate CAs - #415

Open
lelia wants to merge 4 commits into
mainfrom
lelia/emudhra-ca-trust
Open

lelia wants to merge 4 commits into
mainfrom
lelia/emudhra-ca-trust

Conversation

@lelia

@lelia lelia commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Updates the Docker image so its TLS clients stop trusting the eMudhra intermediate CAs whose keys were disclosed on 2026-10-20 (details). Companion to SocketDev/socket-basics#128.

Root Cause

The image's CA stores predate the distrust:

  • Alpine ca-certificates from the base image (curl, git, Go, Java). apk add doesn't upgrade packages the base image already has.
  • certifi 2025.11.12 in uv.lock (Python requests).
  • Node's bundled store (Coana, the Socket npm CLI). Node hasn't released a fix yet.
  • uv 0.10.4's bundled roots.

Fix

  • Dockerfile: upgrade ca-certificates and fail the build below 20261020-r0.
  • uv.lock: certifi 2026.10.19.
  • Dockerfile and scripts/docker-entrypoint.sh: point Node at the system store with --use-openssl-ca. The entrypoint prepends it to a caller's own NODE_OPTIONS and skips it if the caller already chose a CA store. Can be removed once Node ships a fix.
  • Dockerfile: uv 0.13.4.
  • Version 2.11.2 and changelog entry.

Alpine's go package is still 1.26.9, so scanners will keep flagging it until Alpine updates. Its TLS uses the fixed system store.

Testing

Built locally and ran each client against the two test hosts, dv-g3b-emudhra.we-have-a-problem.com and dv-g3b-aaa-emudhra.we-have-a-problem.com. On 2.11.1, curl, Python, Node, Go and Java accept the first. On this branch, curl, git, Python, Node, uv, Go and Java reject both. api.socket.dev, the npm registry, PyPI, proxy.golang.org, Maven Central and GitHub still connect.

Also checked the entrypoint with no NODE_OPTIONS, an empty one, a heap limit, multiple flags, and an explicit --use-bundled-ca. pytest (580 passed), uv lock --locked, hatch build and twine check pass.

Quick check against socketdev/cli:pr-415:

docker run --rm --entrypoint curl socketdev/cli:pr-415 -sS -o /dev/null -w '%{http_code}\n' https://dv-g3b-emudhra.we-have-a-problem.com/

2.11.1 prints 200; this branch fails certificate verification.

Public Changelog

The CLI and every tool in the socketdev/cli Docker image now reject certificates issued from the compromised eMudhra intermediate CAs.


Note

High Risk
Changes system-wide CA trust for every TLS client in the Docker image (Alpine, Python, Node, uv); misconfiguration could break legitimate HTTPS or leave distrusted chains accepted.

Overview
Release 2.11.2 hardens TLS across the socketdev/cli Docker image and Python CLI so clients no longer trust certificates chained to the compromised eMudhra intermediate CAs.

The Dockerfile now upgrades Alpine ca-certificates (with a build-time floor of 20261020-r0), sets NODE_OPTIONS=--use-openssl-ca so Node uses the patched system store until Node ships its own fix, and bumps the bundled uv image from 0.10.4 to 0.13.4 for updated root bundles. scripts/docker-entrypoint.sh prepends --use-openssl-ca when callers add their own NODE_OPTIONS, without overriding an explicit CA-store flag.

uv.lock pins certifi to 2026.10.19 for Python/requests TLS. Version strings move to 2.11.2 in pyproject.toml, socketsecurity/__init__.py, and CHANGELOG.md.

Reviewed by Cursor Bugbot for commit c6f5cd9. Configure here.

Require Alpine ca-certificates 20261020-r0+ in the image, bump certifi to
2026.10.19, point Node at the system store with NODE_OPTIONS=--use-openssl-ca
until Node ships its fix, and bump the bundled uv to 0.13.4.
@lelia
lelia requested a review from a team as a code owner October 21, 2026 02:14
@lelia lelia added the publish-docker-preview Publish `socketdev/cli:pr-<number>` to DockerHub label Oct 21, 2026
@lelia
lelia deployed to socket-firewall October 21, 2026 02:14 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown

🐳 Docker preview published: socketdev/cli:pr-415

This mutable tag is only created when a Docker preview is explicitly requested.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread CHANGELOG.md Outdated
Comment thread Dockerfile
@lelia lelia mentioned this pull request Oct 21, 2026
1 of 9 tasks
The entrypoint now prepends --use-openssl-ca to a caller-supplied NODE_OPTIONS
(e.g. a heap limit) instead of letting it replace the image default, unless the
caller already picked a CA store. Also trims the 2.11.2 changelog entry to what
users will notice.
@lelia
lelia deployed to socket-firewall October 21, 2026 02:29 — with GitHub Actions Active
@lelia
lelia deployed to socket-firewall October 21, 2026 02:44 — with GitHub Actions Active
@lelia
lelia deployed to socket-firewall October 21, 2026 03:07 — with GitHub Actions Active
@lelia

lelia commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit c6f5cd9. Configure here.

This branch was successfully deployed

1 active deployment
socket-firewall — c6f5cd97 Deployed Oct 21, 2026 by lelia via python-sfw-smoke-enterprise #503
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

publish-docker-preview Publish `socketdev/cli:pr-<number>` to DockerHub

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant