Repository navigation
fix(transport): Reject leaked eMudhra intermediate certificates - #6336
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:
|
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:
|
fdafbb8 to
099ea84
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:
|
d7b91f1 to
cdae9a0
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:
|
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:
|
adinauer
left a comment
There was a problem hiding this comment.
LGTM, changelog needs to be moved
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>
Checking the server certificates once after connect() missed the new connections HttpURLConnection opens on its own to retry a request, and chains Android completes from intermediates cached on earlier connections. Wrap the SSLSocketFactory so every handshake is checked, and match the leaf's issuer by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9d8d58a to
dc4cea1
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:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🚨 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 whose certificate was issued by one of the eight leaked eMudhra intermediates (CVE-2026-111943) in the two places where the SDK opens its own HTTPS connections: the envelope transport (
HttpConnection) and the distribution update check (DistributionHttpClient).How does it work:
Both wrap the connection's
SSLSocketFactory(the one fromSentryOptions.sslSocketFactory, or else the connection's own) withDistrustedCertificates.wrap. The sockets it creates check the server's certificates after every handshake and before the first read or write, then close the socket and throwSSLPeerUnverifiedExceptionif one of them was issued by, or is, a leaked CA. Since that is anIOException, a blocked envelope is kept in the offline cache and retried later.Why the socket and not once after
connect():HttpURLConnectionsilently opens a new connection to retry a POST when the first one fails before a response, and that handshake was never checked.pathlen:0), so anything they issued is a leaf, and the server always sends the leaf. The name also matches the AAA Certificate Services cross-signs, which share the subject.On Android 5.0 and 5.1, Conscrypt only sends SNI once
setHostnameis called, which Android's HTTP stack does by reflection and which does nothing on a wrapper, so the factory makes that call on the real socket. Later versions send SNI by default.💡 Motivation and Context
https://emudhra.we-have-a-problem.com/
Fixes JAVA-783
💚 How did you test it?
DistrustedCertificatesTestsends envelopes through a realHttpConnectionto aMockWebServerover TLS. As in OkHttp'sCompromisedIntermediateTest, it signs leaves with the realEM OV TLS CA - G3Ccertificate, whose private key is 4. It covers the full leaked chain, a leaf-only chain the client completes itself, and a retry on a new connection. The last two pass the old check afterconnect(). The Android-only SNI path is not tested on a device.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
ApacheHttpClientTransportfromsentry-apache-http-client-5doesn't useHttpsURLConnection, so it needs its own check in a follow-up PR.SpotlightIntegrationonly talks to a local server, and the HTTP client integrations (sentry-okhttp, OpenFeign, Ktor, Spring) instrument the app's own clients, which the app has to fix itself.🤖 Generated with Claude Code