Buggy Key Migration Script Compromises 16 eMudhra CA Certificates
Written by AI from the linked story. Not reviewed by an editor. How this works
eMudhra's use of a custom Python script to transfer private keys between Hardware Security Modules (HSMs) introduced a critical bug that weakened ECDSA keys and mishandled RSA keys, ultimately undermining the cryptographic integrity of 16 intermediate CA certificates. The root cause was inadequate validation and testing of the key migration tooling before it was used in production on highly sensitive cryptographic material. A missed early warning — CRLs signed with mismatched keys in June 2025 — shows that existing monitoring failed to flag a serious process failure in time. This incident matters because compromised CA private keys can enable the issuance of fraudulent certificates, eroding trust across the entire PKI ecosystem that relies on eMudhra as a trusted authority.
Tactical Insight
Immediate actions
- Revoke and replace all certificates whose private keys were generated or handled by the flawed script.
- Conduct a full audit of all HSM key management procedures and custom tooling currently in use.
Long-term improvements
- Require peer review, automated testing, and formal security assessment of any script or tool that touches HSM key material before production use.
- Enforce cryptographic key integrity verification (e.g., test signatures and CRL consistency checks) immediately after any key migration or transfer operation.
- Establish a formal change management process for PKI operational tooling with mandatory sign-off from a qualified cryptography engineer.
Detection measures
- Implement automated consistency checks that alert when CRL signing keys do not match the issuing CA certificate, treating mismatches as critical incidents.
- Deploy continuous compliance monitoring against CA/Browser Forum Baseline Requirements to catch deviations in key handling workflows before certificates are issued.