Robin reports finding weak mail-signing keys still published by 96 domains in the Tranco top-million list. The keys match those produced by a predictable random number generator that Debian fixed in 2008 as CVE-2008-0166. The finding concerns keys from affected builds that remain trusted today. It is not a new flaw in OpenSSL or in DKIM.
DKIM, or DomainKeys Identified Mail, lets recipients verify that a domain signed a message. Senders use a private key to sign and publish a matching public key in DNS. A selector is the label that lets a recipient look up the right public key. If an old key was predictable, an attacker could forge signatures while its selector still publishes the key. The sender’s current mail server can be fully patched and use a different signing key.
Rotate the key and retire the old selector
- Inventory the selectors for domains you manage. Compare DNS records with what your own mail servers and providers use. Include marketing, billing and support tools, plus records that point to former providers.
- Replace suspect keys with fresh ones under a new selector. If you use RSA, the DKIM standard recommends at least 2,048 bits. Send test mail through each legitimate sender and confirm that a receiving system verifies the new selector.
- Remove or revoke the old public key. For planned rotations, account for mail still in transit. If a key is known weak or exposed, prioritize revocation and account for DNS caches. Changing the signer alone leaves verifiers able to accept signatures under the old key.
What the thread adds
In the Hacker News discussion, hannob, the author of badkeys, described finding the same problem in 2024. He said later checks still found affected records.
pavinjoseph said a DNS provider’s handling of long records delayed a move to 2,048-bit keys. In a planned rotation, test that recipients can retrieve and use the replacement record before retiring a healthy key.
From a 23-comment thread, in HN’s own order.
Caveat: The survey found published keys. It did not count forged messages or show that anyone used the keys in an attack.