Repository navigation
fix(transport): Reject leaked eMudhra intermediate certificates - #6336
runningcode wants to merge 3 commits into
Conversation
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
1 similar comment
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
📲 Install BuildsAndroid
|
9099fca to
c17d99a
Compare
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
The private keys of eight eMudhra intermediates can be recovered from their certificates (CVE-2026-111943). Their Sectigo cross-signs chain to AAA Certificate Services, which is trusted on every Android version, so platform trust store updates won't reach every device. The envelope transport and the distribution client now reject servers that present one of these keys, right after the TLS handshake and before any request is written. Fixes JAVA-783 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Inject the check through HttpConnection's constructor like AuthenticatorWrapper, so its tests can stub it instead of loading the real eMudhra certificate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c17d99a to
fdafbb8
Compare
🚨 Detected changes in high risk code 🚨High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:
|
📜 Description
Rejects TLS servers that present one of the eight leaked eMudhra intermediate certificates (CVE-2026-111943). The check covers the two places where the SDK opens its own HTTPS connections: the envelope transport (
HttpConnection) and the Android distribution update check (DistributionHttpClient).The new internal
DistrustedCertificates.verify(connection)runs right afterconnect(). It hashes the public key of every certificate the server presented. On a match, it disconnects and throwsSSLPeerUnverifiedException. At that point the TLS handshake is done, but no part of the request has been written yet, both on the JVM and on Android's built-inHttpsURLConnection. A blocked envelope fails with anIOException, so it stays in the offline cache and is retried later.💡 Motivation and Context
The private keys of eight eMudhra intermediates can be recovered from their certificates. Sectigo's AAA Certificate Services root also cross-signed each of these keys, and that root is trusted on every Android version. So removing the eMudhra root from trust stores isn't enough, and devices that don't get CA or Conscrypt updates keep trusting forged certificates. Browsers are protected by Certificate Transparency and their own revocation lists, but
HttpsURLConnectionhas neither.OkHttp (writeup) and Go 1.26.10 / 1.27.3 (commit) ship the same mitigation. OkHttp's workaround uses a
HostnameVerifier, but that doesn't work here: the JVM'sHttpsURLConnectiononly calls a custom verifier when its own hostname check fails. That's why this checks the server certificates afterconnect()instead.The eight SPKI hashes match the OkHttp and Go lists. They were also re-computed from the 16 certificates in the disclosure's impacted-intermediates.json. Background: Mozilla dev-security-policy thread.
Fixes JAVA-783
💚 How did you test it?
Unit tests in
DistrustedCertificatesTestandHttpConnectionTestuse the realEM DV TLS CA - G3Bcertificate cross-signed by AAA Certificate Services.DistributionHttpClientcreates its own connection with no way to inject a mock, so it relies on the tests of the shared check.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Out of scope:
SpotlightIntegrationonly talks to a local server, and the HTTP client integrations (sentry-okhttp, Apache, OpenFeign, Ktor, Spring) instrument the app's own clients, which the app has to update itself.🤖 Generated with Claude Code