Skip to content

fix: distrust compromised eMudhra certificate chains - #14719

Merged
ChiragAgg5k merged 1 commit into
mainfrom
fix/emudhra-ca-trust
Oct 21, 2026
Merged

ChiragAgg5k merged 1 commit into
mainfrom
fix/emudhra-ca-trust

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Update the self-hosted server's runtime and matching Xdebug base images from 2.2.3 to released 2.2.5, which includes the eMudhra CA distrust update and the embedded Go verifier fix. Also require Alpine ca-certificates and ca-certificates-bundle version 20261020-r0 or newer in the independent Composer stage and regenerate the trust bundle before downloading dependencies.

The compromised intermediate CA keys allow forged certificates for arbitrary domains. Normal certificate and hostname verification does not protect clients that still trust these chains. Production and development inherit the patched runtime base; the matching Xdebug pin preserves the PHP ABI for debug builds.

Test Plan

  • Built the complete production image and the development image with DEBUG=true locally on arm64.
  • In the built production image, both installed Utopia cURL and Swoole clients reject https://dv-g3b-emudhra.we-have-a-problem.com/ and https://dv-g3b-aaa-emudhra.we-have-a-problem.com/ with TLS verification errors; both accept https://example.com/ with HTTP 200. Verification remained enabled.
  • Built the actual composer target and verified PHP cURL and OpenSSL streams reject both incident chains while accepting the normal HTTPS control.
  • Confirmed Xdebug loads in the debug image and is absent from production.
  • docker build --check ., bin/monorepo validate, and git diff --check pass.

No PHP application code changed; broad PHP unit/E2E suites were not run locally. This PR does not publish a self-hosted server release or update existing installations. Operators must upgrade/recreate their server containers after a patched server image is released. Function/site runtime images and other independent service images need separate assessment.

Related PRs and Issues

Checklist

  • Read the contributing guidelines.
  • API metadata/spec changes (not applicable).

Related: appwrite-labs/cloud#6671

@luxor-code-review

luxor-code-review Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


This PR updates the Docker build to pick up a CA-certificate bundle that distrusts the compromised eMudhra roots. The appwrite/base image is bumped from 2.2.3 to 2.2.5 (with the xdebug variant and its comment kept in sync), and the composer stage upgrades ca-certificates with a version floor before running composer install, so build-time TLS does not trust the affected chains.

Files Change
Dockerfile Bumps base image tags 2.2.3 -> 2.2.5 and pins ca-certificates >=20261020-r0 with update-ca-certificates in the composer stage.

Reviewed commit: 973dff4

@ChiragAgg5k ChiragAgg5k self-assigned this Oct 21, 2026
@ghost

ghost commented Oct 21, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The Composer dependency stage and runtime/debug image pins consistently receive the stated certificate-trust update.

The Dockerfile now updates the independent Composer stage's Alpine CA packages before downloading dependencies. The server and matching Xdebug stages also use appwrite/base:2.2.5 instead of 2.2.3.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 1
File Change
Dockerfile Refreshes Composer-stage CA trust and bumps the production and Xdebug base image pins to 2.2.5.

Reviewed 973dff4 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost 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.

🟢 Tier S · Looks good to merge. Summary

@github-actions

Copy link
Copy Markdown

Security rules

No new WARNING or ERROR findings from security rules.

19 existing findings tracked in .semgrep/baseline.json
  • php.appwrite.guest-write-without-abuse-limit (12)
  • php.appwrite.secret-compare-timing (5)
  • php.appwrite.weak-secret-env-default (2)

Posted by Checks / Rules. Re-runs update this comment in place. Rule details and baseline: .semgrep/README.md.

@ChiragAgg5k
ChiragAgg5k merged commit 01f04d8 into main Oct 21, 2026
67 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/emudhra-ca-trust branch October 21, 2026 11:30
@github-actions

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → fix/emudhra-ca-trust (after).

Metric Before After Change
🚀 Requests/sec 215.85 219.6 ⚪ +1.7%
⏱️ Latency P50 79.58 ms 79.59 ms ⚪ 0%
⏱️ Latency P95 191.96 ms 180.07 ms 🟢 -6.2%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 79.59 180.07 13,680 219.6 -11.88
Account 147.53 296.74 720 12.26 +0.14
TablesDB 78.36 147.53 7,440 121.54 +15.63
Storage 70.82 164.62 3,600 60.52 -24.21
Functions 108.9 202.18 1,920 32.98 -45.81

Top API waits (after)

API request Max wait (ms)
account.name.update 673.14
functions.create 401.36
tablesdb.rows.create 378.69
functions.variables.update 339.96
account.get 332.68

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