eMudhra CA Key Compromise: Updating Devices Managed with Nexigon
The private keys of eight eMudhra intermediate certificate authorities have been compromised. This likely affects every outgoing TLS connection from your devices, not only the one to Nexigon Hub. Here is what to update in your device images and why.
- security
- tls
- embedded-linux
The private keys of eight intermediate certificate authorities (CAs) operated by eMudhra have been compromised. Six of them issue TLS certificates. Anyone can now use their keys to issue certificates for any domain, and clients that trust these intermediates accept them.
Nexigon Agent verifies HTTPS connections against the operating system’s trust store. To protect your devices, rebuild your images so that their trust store no longer contains the affected roots. Agent versions up to 0.6.0 also trusted a compiled-in list of roots for some connections, so upgrade the Agent as well. In short:
- Update the
ca-certificatespackage in your device images and roll the images out. - Upgrade Nexigon Agent and the Nexigon CLI to 0.6.1.
- If you use Nexigon with Rugix, upgrade Rugix Ctrl to 1.3.1.
The Issue
The private keys of the affected intermediates are integers smaller than 256, so anyone can recover them from the public certificates. The incident page lists the affected certificates and tracks fixes across projects.
An attacker who can intercept a device’s network traffic can use these keys to impersonate any HTTPS server, for example Nexigon Hub or a storage endpoint, and read or modify the traffic.
The intermediates chain to two roots: emSign ECC Root CA - G3 and, through a cross-signature, Comodo AAA Services root. Browsers blocked the intermediates within hours to days through their own revocation mechanisms. Most embedded devices have no comparable mechanism. They trust whatever their image’s trust store contains until the image is updated.
Nexigon Cloud’s certificates chain to ISRG Root X2 from Let’s Encrypt and are not affected. Removing the eMudhra roots from your devices does not interrupt their connection to Nexigon Cloud.
Why Nexigon Agent Uses the System Trust Store
Nexigon Agent is designed to verify Nexigon Hub and every other HTTPS endpoint against the trust store of the operating system it runs on, usually provided by the ca-certificates package.
The reason is that a device should have a single place that decides which certificate authorities it trusts. Most other software on the device, such as curl, package managers, and your applications, already uses the system trust store. When a CA has to be distrusted, as now, one update to your image then fixes the Agent together with everything else. You do not have to wait for an Agent release or track which components carry their own copies of root certificates. The same applies in the other direction. If you run Nexigon Hub with a certificate from your own CA, you add that CA to the system trust store once, and the Agent trusts it like every other component.
The tradeoff is that the Agent is only as current as the trust store in your image.
Until 0.6.1, Nexigon Agent and CLI did not fully follow this design. Their connection to Nexigon Hub has always used only the system trust store, and our own TLS configuration selected it for all other connections, too. However, our shared telemetry library enabled a compiled-in list of root certificates for OTLP export. Through Cargo’s feature unification, this list also applied to the Agent’s and CLI’s other HTTPS connections, namely repository asset uploads and pairing-key provisioning. The list still contained emSign ECC Root CA - G3, so updating ca-certificates alone did not fully protect these connections. We did not notice because nothing checked that our builds stayed free of bundled root certificates.
Agent and CLI 0.6.1 use only the system trust store for all HTTPS connections, and our builds now reject dependencies that bundle root certificates. In addition, they reject certificate chains containing the compromised intermediate keys, even on devices whose trust store has not been updated yet. See the release notes for details.
Rugix Ctrl, which Nexigon’s Rugix integration uses to install updates, currently also ships its own trust store. Future Rugix Ctrl releases will use the system trust store as well.
What to Update
System Trust Store
For Debian-based images, rebuild the image with the updated ca-certificates package. If you build with Rugix Bakery and pin a Debian snapshot, move to a snapshot that contains the update.
For Yocto, the ca-certificates recipe in OpenEmbedded-Core does not include a fix at the time of writing. Until it does, distrust the roots with a bbappend in your own layer:
recipes-support/ca-certificates/ca-certificates_%.bbappenddo_install:append() { sed -i \ -e 's|^mozilla/emSign_ECC_Root_CA_-_G3.crt|!&|' \ -e 's|^mozilla/Comodo_AAA_Services_root.crt|!&|' \ ${D}${sysconfdir}/ca-certificates.conf }
The ! prefix makes update-ca-certificates exclude the certificate when it generates the trust store during the image build. Current ca-certificates releases no longer trust Comodo AAA Services root for TLS, so the second line only matters if your image’s /etc/ca-certificates.conf still lists mozilla/Comodo_AAA_Services_root.crt. Distrusting this root can also break legitimate Sectigo certificate chains that lead to it, so test your HTTPS endpoints before rolling out the image.
Container images carry their own trust stores. Rebuild them on updated base images as well. Some applications ship their own trust stores, too. The Rugix guidance lists common examples.
Nexigon Agent and CLI
Upgrade Nexigon Agent on your devices to 0.6.1:
- Rugix Bakery: The
nexigon/nexigon-agentrecipe from thev0.3branch ofnexigon-rugixinstalls 0.6.1 by default. Rebuild your image. If you set the recipe’sversionparameter, change it tov0.6.1. - Yocto: Update
meta-nexigonto a revision with thenexigon-agent_0.6.1.bbrecipe. - Other installations: Use the installation script or the binaries and Debian packages from the GitHub release.
Also upgrade the Nexigon CLI on your workstations and CI systems.
Rugix Ctrl
Nexigon’s Rugix integration downloads update bundles with Rugix Ctrl, which verifies them against its compiled-in trust store. Updating ca-certificates does not affect it. Rugix Ctrl 1.3.1 removes emSign ECC Root CA - G3 and rejects the compromised intermediates. If your devices use Rugix, include Rugix Ctrl 1.3.1 in the rebuilt image. The Rugix guidance explains the details.
You can roll out the rebuilt images with Nexigon as usual.
Verifying a Device
The incident page provides test endpoints that serve certificates from the compromised intermediates. On a device, run:
curl https://dv-g3b-emudhra.we-have-a-problem.com/
curl https://dv-g3b-aaa-emudhra.we-have-a-problem.com/
On a device whose trust store no longer trusts the intermediates, both requests fail with a certificate error. curl only checks the system trust store. For Nexigon Agent and Rugix Ctrl, check that the installed versions are 0.6.1 and 1.3.1 or later.
Hardening Nexigon Agent
We will investigate ways to harden Nexigon Agent against gaps in the system trust store. Options include pinning the certificate authorities that Nexigon Cloud uses, so that a compromised CA elsewhere cannot impersonate Nexigon Hub, and checking certificate revocation. We will share what we learn once we have evaluated the tradeoffs.
If you have questions about this incident or need help updating your devices, contact us.
