Feature
Sandbox SDK 0.12.14 updates trusted certificates after the eMudhra compromise
The private keys of eight eMudhra intermediate certificate authorities can be recovered, so anyone can forge a certificate for any hostname that chains to them. Sandbox SDK images before 0.12.14 trust these certificates. An HTTPS connection that leaves the container directly, such as one from mountBucket(), backups, gitCheckout(), tunnels, or code that runs in the sandbox, can be intercepted with a forged certificate.
What you need to do
Sandbox SDK 0.x
Update immediately. Install @cloudflare/sandbox@0.12.14, change the FROM line in your Dockerfile to the matching image, and redeploy. Keep any -python, -opencode, or -musl suffix on the image tag. The deployment's rollout replaces running sandboxes with ones that use the new image.
Dockerfile
FROM docker.io/cloudflare/sandbox:0.12.14
If you use the next prerelease, update to 0.13.0-next.825.1 or later.
If you cannot update yet and use 0.8.7 or later, send all HTTPS through your Worker, so that Cloudflare checks every certificate on port 443 whatever your image trusts:
src/index.ts
import { Sandbox, ContainerProxy } from "@cloudflare/sandbox"; export { ContainerProxy }; export class MySandbox extends Sandbox { interceptHttps = true; } MySandbox.outbound = (request: Request) => fetch(request);
Deploy, then stop running sandboxes so that they restart with the interception certificate. This does not cover TLS on other ports, such as cloudflared tunnels, and clients that ignore the injected certificate fail to connect. For more information, refer to HTTPS traffic.
Sandbox SDK 1.x
You do not need to update the SDK, because it makes no TLS connections of its own. Your image decides which certificates your sandboxes trust, so rebuild it and replace the sandboxes that run the old one:
- Run docker pull for each base image in your Dockerfile, then clear the Docker build cache with docker builder prune --all. wrangler deploy builds with your local images and build cache, so without these steps it can ship the old CA certificates and runtimes. If your Wrangler configuration references an image by digest, build and push a new image and update the digest instead.
Read the original announcement
Get Sandboxes updates by email
Don't miss the next one: a weekly email with Sandboxes's new features and deprecations.