blog article
eMudhra, Three Weeks Later: Browsers Blocked It in Two Hours. Embedded SDKs Still Trust It.
A follow-up on the eMudhra CA key compromise. The root cause changed (the ceremony script itself picked the weak keys, and a failed CRL signature flagged it 16 months early), 107,107 certificates were minted with the leaked keys, and while browsers and desktop trust stores have moved on, every tagged ESP-IDF release, Arduino-ESP32, CircuitPython and wolfSSL's ESP-IDF port still accept forged chains, some through a Sectigo cross-sign that SDKs kept on purpose. We tested each with Mbed TLS, and wrote a firmware scanner and a blocklist callback.
TL;DR: Three weeks after eMudhra’s intermediate CA keys turned out to be numbers like
4, the browser side is done. Chrome and Firefox blocked the keys within hours, then removed the root, and certifi, webpki-roots, curl’s bundle and Ubuntu’sca-certificatesfollowed within three days. Devices are a different story. Espressif fixed its release branches on 22 October, but no ESP-IDF release has been tagged since, and every tag, up to v6.1 and v5.5.6, still shipsemSign ECC Root CA - G3in its default bundle. On v5.3 to v5.5 tags even the smaller “common CAs” bundle accepts a forged chain, through a Sectigo cross-sign that embedded SDKs re-added on purpose. Arduino-ESP32 3.3.12, CircuitPython and wolfSSL’s ESP-IDF port are exposed too. We took one of the 107,107 public certificates minted with the leaked keys and verified it against each with Mbed TLS 3.6. Below: what changed in the root cause, why devices are the long tail, a scanner for firmware images and CA bundles, and a small Mbed TLS callback that blocks the keys.
Update, 11 November: the full report
eMudhra posted its full incident report on 10 November, a day after its own deadline. Three things in it matter here:
- The cause is a host-side script. A one-off Python script read each private key out of the HSM into the ceremony host’s memory and rebuilt it there. For the ECDSA keys, one line kept only the leading byte. We’ve updated the root cause below.
- Eight more keys are in scope. The RSA-4096 G2B/G2C intermediates
went through the same script. Their keys are intact, but eMudhra can’t
show they stayed confidential, and revoked them on 7 November without a
compromise reason. Six of them chain to
emSign Root CA - G1, which is still in Mozilla’s store, curl’s bundle and ESP-IDF’s full bundle,masterincluded. Details below. - The blocklist covers them now. We added the eight RSA keys to
emudhra-blocklist.cand re-tested it with Mbed TLS 3.6.6.
Nothing in the report changes the device findings. None of the ESP-IDF patch releases has been tagged yet.
Our first post covered what happened and the checks that would have caught it. Since then, two things moved: what eMudhra says actually went wrong, and how far the fix has travelled. The first is a lesson for anyone who runs a provisioning line. The second is a problem for anyone who ships firmware.
The root cause changed, and it’s worse
In its first account, eMudhra said a modified ceremony script created a second, weak key pair, and someone picked it for the CSR “because the key labels were similar.” We repeated that in our first post. eMudhra’s written answers of 29 October correct it:
- On 30 April 2025, the ceremony script generated each B and C series key, then wrapped, unwrapped and re-imported it as a planned rehearsal for moving the keys to another vendor’s HSMs. That left two objects with almost the same label for each CA.
- The re-imported objects did not contain the same key. The full report of 10 November explains how: the script read the unwrapped private key out of the HSM into the ceremony host’s memory and created a new key object from that value. For the ECDSA keys, one line of that Python kept only the leading byte of the private value. FIPS-approved mode was switched off for the step, as an approved deviation.
- Nobody picked the wrong key by hand. In eMudhra’s words: “the ceremony script specified creating the CSRs from the re-imported keys, and it did so.”
Then comes the part that matters most. On 6 June 2025, the system raised a flag. Sectigo noticed that CRLs for these intermediates didn’t verify against the CA certificates (Bug 1970728). The CRL signer was using the key the HSM had generated, and the certificates were bound to the re-imported one. eMudhra treated it as a configuration issue and pointed the CRL application at the key that matched the certificate, which was the weak key. The error went away. Sectigo and the root programs weren’t told that the certified keys might not be the intended ones. eMudhra now says, in hindsight, that the mismatch alone should have been reported.
So the weak keys were detectable 16 months before anyone ran
paranoid_crypto. A signature that doesn’t verify against the key you
think you’re using is not a config bug. It’s the system telling you that
your key inventory is wrong. The fix that makes the error go away by
switching keys is the one fix you must not make before you know why.
If you run a device provisioning line, translate that directly. A batch where the device certificate doesn’t match the key the secure element reports, or an OTA signature that only verifies once you “use the other key”, is a stop-the-line event. Treat it as one.
What happened since 21 October
- Trust stores moved fast. Mozilla removed
emSign ECC Root CA - G3from NSS on 20 October, and Chrome followed the same path. Downstream, certifi dropped it in 2026.10.18, rustls’ webpki-roots in 1.0.10 (19 October), curl’scacert.pemon 20 October, and Ubuntu shipped aca-certificatessecurity update on 20 October that blocklists it ahead of the next Mozilla sync. - The keys got used, publicly. A participant in the Mozilla incident
bug counted
107,107 certificates signed with six of the eight keys, logged to
e-Szignó’s CT logs on 20–21 October. Most are proof-of-concept
certificates for
google.com. One, foremsign.filippo.io, carries SCTs from logs that Chrome lists as usable. Almost none have an OCSP or CRL pointer, so a client that only checks revocation for the end-entity certificate finds nothing to check. - eMudhra is leaving TLS. It announced a voluntary exit from the global
SSL/TLS business. The roughly 30,000 affected certificates, mostly
Internet2/InCommon in the US, were moved to its RSA
emSign Root CA - G1hierarchy as a stopgap. - Chrome checked everyone else. The Chrome Root Program
says that
within an hour of learning how the keys were found, it ran
paranoid_cryptoover every Chrome-trusted CA certificate in CT and the CCADB. It found no more weak CA keys, and it now repeats the check regularly. - The full report landed a day late. eMudhra had set itself a
deadline of 9 November. The
report was
posted on 10 November and confirms the host-side script above. It also
widens the scope: the eight RSA-4096 B/C series intermediates went
through the same read-back. Their keys came out intact, but they sat in
plain text in a Python process, and eMudhra says it cannot show they
stayed confidential. It revoked them on 7 November with reason
cessationOfOperation, notkeyCompromise. All issuance from theemSign Root CA - G1hierarchy stops by 16 November, and the independent review is now due on 4 December. The script hasn’t been published, and the thread is full of follow-up questions. What the RSA keys mean for devices is below. - Vendored copies regress. Even Mozilla’s own tree slipped: a routine
re-vendor of pip put the old certifi, with the emSign root, back into
Firefox’s source five days after it was removed
(Bug 2091180,
fixed 10 November). If it happens there, it happens in your
third_party/.
Why devices are the long tail
The browser fix worked because browsers have two things most devices don’t: a pushed blocklist (CRLSet, OneCRL) that reaches clients in hours, and CT enforcement, which made certificates that were never logged useless against CT-enforcing browsers from day one.
A typical embedded TLS client has neither. With Mbed TLS:
- The CA store is compiled into the firmware image. Changing it means building and shipping new firmware.
- There’s no CRL fetching and no OCSP client for the chain. Mbed TLS checks revocation only against CRLs you load yourself, and almost nobody does on a microcontroller. eMudhra and Sectigo revoking the intermediates is invisible to it.
- There’s no CT check. An attacker holding one of these keys doesn’t need to log anything. They mint a certificate for your cloud endpoint, get on-path (a hostile Wi-Fi AP, a poisoned DNS reply, a compromised router) and serve it.
So for a device, the only fix that works is the one browsers did last: remove the root from the trust store. That’s why the trust-store timeline above matters, and why the stores that haven’t caught up matter most.
ESP-IDF, tested
ESP-IDF’s certificate bundle is a filtered copy of Mozilla’s list, compiled
into the application. The default Kconfig choice is
MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL, the full bundle.
Espressif fixed this quickly in git: on master
on 21 October,
on the v5.3 to v6.0 release branches on 22 October, and on release/v6.1
on 26 October. If you build from the head of a release branch, you have
the fix. But no release has been tagged since (the newest, v5.5.6, is from
16 October), so every tagged release still includes the root: v5.3.6,
v5.4.4, v5.5.6, v6.0.3 and v6.1 all carry emSign ECC Root CA - G3.
Espressif is tracking this in
esp-idf#19282. As of
9 November, the fix (dropping both emSign ECC Root CA - G3 and the AAA
root, below) is on every supported branch and will ship in v6.1.1,
v6.0.4, v5.5.7, v5.4.5 and v5.3.7. Until then, Espressif’s advice is to
track the release branch head or cherry-pick the merge commit listed in
the issue. v5.2 and older are end of life and won’t get the fix; there
you need a custom bundle (MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE) or an
upgrade. Espressif also says it is considering decoupling the bundle from
ESP-IDF releases, which would fix the underlying problem.
Tags matter more than they look. Espressif’s
own guidance
is “for production purposes, use the current stable version”, and the
ecosystems layered on ESP-IDF ship prebuilt libraries from one.
Arduino-ESP32 3.3.12, the current stable core (18 September), has both
roots compiled into its libmbedtls.a; our scanner finds them in the
release’s esp32-libs package. The maintainers have already regenerated
the libraries
(arduino-esp32#13012),
so the next release will have the fix. And every device already in the
field keeps whatever bundle it shipped with until its next OTA.
To see what that means in practice, we built Mbed TLS 3.6.6’s cert_app and
verified two forged chains, both built from public certificates. The leaf
is the CT-logged emsign.filippo.io certificate, signed with the
EM DV TLS CA - G3B key (d = 156).
- emSign path: that intermediate, then
emSign Root TLS CA - G3cross-signed byemSign ECC Root CA - G3. - Sectigo path: the same key, in the copy of that intermediate that
Sectigo cross-signed under
AAA Certificate Services(valid until 31 December 2028, revoked 19 October).
Trust store passed as ca_file | emSign path | Sectigo path |
|---|---|---|
| ESP-IDF v6.0.3 / v6.1, full bundle | ok | failed |
| ESP-IDF v6.0.3 / v6.1, common CAs | failed | failed |
| ESP-IDF v5.3.6 / v5.4.4 / v5.5.6, full bundle | ok | ok |
| ESP-IDF v5.3.6 / v5.4.4 / v5.5.6, common CAs | failed | ok |
ESP-IDF release/v5.5 and master | failed | failed |
wolfSSL master, ESP-IDF port bundle | ok | ok |
CircuitPython main (10 Nov) | ok | ok |
adafruit/certificates main | failed | ok |
curl cacert.pem, current | failed | failed |
ESP-IDF’s runtime bundle stores issuer names and public keys rather than whole certificates, but it trusts the same keys, so the result is the same. This is not a vulnerability in ESP-IDF or Mbed TLS. Both do exactly what their trust store tells them to. The point is that the store in your firmware is a snapshot, and these snapshots predate 20 October.
The Sectigo path, and why SDKs kept it open
Sectigo cross-signed the same eight keys under AAA Certificate Services.
Mozilla dropped that root in 2025, so it isn’t in curl’s or certifi’s
bundles, but Sectigo
notes that
Microsoft and Apple still trust it. Sectigo revoked the cross-signs on 19
October, and as above, a client that never checks revocation never sees
that.
So why is it in embedded bundles at all? Because SDKs put it back on
purpose. Some servers, github.com at the time among them, sent a chain
that ends in Sectigo’s cross-sign to AAA Certificate Services. Browsers
build an alternative path to a root they trust. ESP-IDF’s bundle verifier
in v5.x checks only the issuer of the topmost certificate the server sends,
so when Mozilla dropped AAA, those servers broke. ESP-IDF
v5.4.1
re-added it and listed it in the “common CAs” subset (v6.0 added a
cross-signed verification mode instead, which is why v6 tags don’t carry
AAA), and
Adafruit’s certificates repository adds it back in tools/extra.pem with
the note “Since mbedtls does not support cross-signing by itself, add it
back.” A compatibility fix for one cross-sign became a trust path for
another.
Espressif’s 22 October fix on the v5.x branches removed AAA as well, with
the commit message “drop the vulnerable root that cross-signs eMudhra”.
Adafruit removed the emSign root on 21 October but still ships AAA, in
both its full and filtered bundles. If your store includes AAA Certificate Services, removing the emSign root isn’t enough. Block the keys, below.
The RSA intermediates, and a root most bundles still carry
The full report adds a second set of keys, and this one reaches further
into devices. Six of the eight RSA intermediates are TLS issuers under
emSign Root TLS CA - G1, which is
cross-signed (valid until 2039) by
emSign Root CA - G1. That root is still in Mozilla’s store, so it’s in
curl’s current cacert.pem and in ESP-IDF’s full bundle, including
master after the 21 October fix. It isn’t in ESP-IDF’s “common CAs”
subset. All six intermediates chain to it, and Mbed TLS 3.6.6 accepts
each chain against today’s curl bundle, even though all six are revoked.
There is no evidence that these keys leaked, and unlike the ECDSA keys
they aren’t weak. But they were revoked only through CRL and OCSP, with a
reason that doesn’t say compromise. Browsers learn about revoked
intermediates through their pushed lists. A device that doesn’t check
revocation keeps trusting them, for as long as it trusts
emSign Root CA - G1.
If your devices don’t talk to servers with emSign certificates, you don’t
need that root, and after 16 November it issues nothing new. If root
programs remove it later, expect the same embedded lag as G3. Taking it
out of your own bundle now costs you nothing. The scanner below doesn’t
look for it; grep "emSign Root CA - G1" on your PEM bundle does. If you
need the root, the blocklist callback
now covers all eight RSA keys.
Other SDKs we checked
| SDK | What we found |
|---|---|
| Zephyr, nRF Connect SDK | No public CA bundle; you provision CAs yourself through TLS credentials or modem security tags. Zephyr’s hal_espressif module carries ESP-IDF’s cacrt_all.pem (with emSign) and cacrt_local.pem (with AAA), but Zephyr’s build doesn’t compile them. |
| Mbed TLS, TF-PSA-Crypto | No trust store at all. TF-PSA-Crypto has no X.509; Mbed TLS verifies against whatever you load. |
| CircuitPython | main (9 November) still pins adafruit/certificates from July 2025, with both roots, and builds it into the Espressif, Raspberry Pi (Pico W) and Zephyr ports. The latest releases, 10.3.1 and 11.0.0-alpha.2, predate Adafruit’s fix. A submodule bump removes emSign but keeps AAA. We reported both: circuitpython#11818, certificates#13. |
| wolfSSL | The ESP-IDF port’s own cacrt_all.pem on master, last regenerated in September 2024, has both. It’s the default bundle when ESP-TLS is set to use wolfSSL. We tested the file with Mbed TLS, not wolfSSL’s verifier. Reported as wolfssl#12078. |
| Arduino-ESP32 | 3.3.12 (stable) compiles both into libmbedtls.a. |
If you pinned your own CA or your cloud provider’s root, this incident doesn’t touch you. If someone pasted a whole Mozilla bundle into the app to “make TLS work”, scan it.
Check your firmware
emudhra-trust-scan.py looks for the two
G3 trust anchors, AAA Certificate Services and the eight compromised keys
in firmware images, CA bundles, DER files and source trees. It needs only
the Python standard library. AAA is reported separately: it’s a legitimate
Microsoft/Apple root, so finding it means “block the keys”, not “remove
this”.
python3 emudhra-trust-scan.py build/my-app.bin main/certs/ ca-bundle.pem
# FOUND build/my-app.bin: emSign ECC Root CA - G3 (trust anchor), raw at offset 0xbdd1
# exit status 1 if anything is found
It searches for each key’s raw EC point (or, for AAA, the RSA modulus).
That value sits verbatim inside a DER certificate, an ESP-IDF
x509_crt_bundle, a BearSSL trust anchor table and a compiled-in C array,
so one byte search covers all of them. PEM blocks, including PEM strings
embedded in a binary, are decoded and searched too. We tested it on ESP-IDF
bundles compiled with Espressif’s own gen_crt_bundle.py (v6.1 full:
found; v5.5.6 common CAs: AAA found; master: clean), on Arduino-ESP32
3.3.12’s libmbedtls.a (found), on curl’s and Ubuntu’s current bundles
(clean), and on the eight intermediates as PEM, DER and a C string (all
found). It doesn’t unpack
compressed or encrypted images, so run it on the build output, not the
signed OTA package.
For ESP-IDF projects, the fix is any one of:
- move to the next patch release (v6.1.1, v6.0.4, v5.5.7, v5.4.5 or v5.3.7) when it’s out, and until then build from the head of your release branch or cherry-pick the merge commit listed in esp-idf#19282;
- on v6.x only, switch to
MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMNwithMBEDTLS_CERTIFICATE_BUNDLE_CROSS_SIGNED_VERIFY, which Espressif says is not affected. On v5.3 to v5.5 tags the “common CAs” subset still contains AAA, so it doesn’t help there; - or better, if your device talks only to your own backend, drop the bundle and pin the CA your backend actually uses.
Until the next Arduino-ESP32 release, and for CircuitPython, use the
callback below, or load your own bundle at runtime (setCACertBundle() on
Arduino-ESP32).
If you can’t ship a new CA store yet
Some fleets can push a code change sooner than a store change, or need a
defence that also covers the AAA cross-signs. For Mbed TLS,
emudhra-blocklist.c is a verify callback that
flags any certificate in the chain whose public key is one of eighteen:
the two G3 roots, the eight ECDSA intermediates and, since 11 November,
the eight RSA intermediates:
int emudhra_blocklist_vrfy(void *ctx, mbedtls_x509_crt *crt, int depth, uint32_t *flags)
{
unsigned char h[32];
size_t hlen;
if (psa_hash_compute(PSA_ALG_SHA_256, crt->pk_raw.p, crt->pk_raw.len,
h, sizeof(h), &hlen) != PSA_SUCCESS) {
*flags |= MBEDTLS_X509_BADCERT_OTHER; /* fail closed */
return 0;
}
for (size_t i = 0; i < sizeof(emudhra_g3_spki_sha256) / 32; i++) {
if (memcmp(h, emudhra_g3_spki_sha256[i], 32) == 0) {
*flags |= MBEDTLS_X509_BADCERT_REVOKED;
}
}
return 0;
}
Install it with mbedtls_ssl_conf_verify(&conf, emudhra_blocklist_vrfy, NULL). Matching the key instead of the certificate catches the eMudhra-
and Sectigo-issued copies alike. The file includes a self-test. Against
the ESP-IDF v6.1 bundle it turns the emsign.filippo.io chain from
accepted into rejected (“The certificate has been revoked”), and leaves
a normal chain (ours) accepted. Against the AAA root it rejects the
Sectigo path the same way. Against curl’s bundle it rejects all six RSA
TLS intermediates through the emSign Root CA - G1 cross-sign, and still
accepts github.com’s chain. It was tested with Mbed TLS 3.6.6.
Two notes for ESP-IDF. First, esp_crt_bundle_attach() installs its own
verify callback, esp_crt_verify_callback(). Install yours after it and
have yours call ESP-IDF’s first, then the blocklist; otherwise you replace
the bundle check instead of adding to it. That function isn’t in the public
header, so declare it yourself. Second, esp_crt_bundle_set() loads a
replacement bundle at runtime, so a bundle kept in a data partition can be
updated without rebuilding the application.
What we’d take from this
- Treat a verification failure as a security event. eMudhra’s warning arrived in June 2025 as a CRL that didn’t verify. The fix that made it verify was the bug.
- Your firmware’s trust store is a snapshot. Know which snapshot you shipped, have a way to replace it without a full release, and scan builds for keys that have been pulled since.
- Pin when you can. A device that only talks to your backend doesn’t need 120 roots. Every root you carry is one more company whose key ceremony you’re trusting.
- Know why each extra root is there. AAA went back into embedded bundles to work around a verifier that can’t build alternative paths. That was a reasonable fix for one website and an open door for this incident. A root added for compatibility needs an owner and an expiry date, like any other exception.
Where Dotstar fits
We work on the device side of TLS and PKI: Mbed TLS and PSA Crypto on Zephyr and nRF Connect SDK, provisioning flows, and the OTA paths that carry trust-store updates. If you want to know which roots your fleet actually trusts and how fast you could change that, that’s a Technical Audit: five days, fixed fee, written findings. If you need the scanner in CI or a trust-store update path built into your OTA, that’s an Engineering Sprint.
Talk to us about your device trust store
Sources
- Mozilla incident bug 2083449, including eMudhra’s 29 October answers and the Chrome Root Program’s comment 50
- Bug 1970728: eMudhra invalid CRL signatures (June 2025)
- Bug 2084101: remove emSign ECC Root CA - G3 from NSS
- Bug 2091180: vendored pip trusts the compromised eMudhra root again
- esp-idf#19282 (fix commits per branch, upcoming patch releases) and arduino-esp32#13012
- ESP-IDF: update esp_crt_bundle certificates (master), release/v6.0, and on release/v5.5 drop the AAA root
- Our reports: adafruit/certificates#13, adafruit/circuitpython#11818, wolfSSL/wolfssl#12078
- adafruit/certificates
tools/extra.pemand the 21 October update - wolfSSL ESP-IDF port bundle, Arduino-ESP32 3.3.12
- Sectigo’s cross-sign of EM DV TLS CA - G3B on crt.sh
- certifi issue 439, webpki-roots PR 133, curl CA extract
- Our first post: eMudhra’s CA private key was 4