DEV Community

Serguey Shinder
Serguey Shinder

Posted on

Our Wildcard Certificate Was Emailed to Eleven Suppliers Every Year and Any of Them Could Have Passed for Our Trade Portal

In 2018 we bought a wildcard certificate, a single certificate valid for any name directly under our domain. It was cheaper than one certificate for each website and simpler to keep track of. Every year, when it was renewed, an engineer exported it with its private key into one file protected by a password, and emailed the file and the password to everyone who needed to install it.

In March 2025 the renewal fell to a new engineer, who asked where the list of recipients was. It was last year's email. It had twenty three recipients, and eleven of them worked for suppliers: the agency that hosts our recruitment site, the company that runs our delivery tracking pages, the firm that looks after our door entry system, the reseller that manages two of our firewalls, and seven more. Several had forwarded the file inside their own companies. One had attached it to a ticket in its own support system.

A certificate's private key is what proves that a server is really us. The wildcard key proved it for every name under our domain, including our trade portal, where customers sign in and pay, and our remote access gateway. Anyone holding that key who could also redirect someone's traffic, on a hotel network or through a compromised router, could present a site that every browser would accept as ours. For seven years our trade portal had been exactly as safe as the least careful of eleven companies we had never assessed for this, and every mailbox the file had passed through.

We found no sign that the key had been misused. We treated it as exposed anyway. We revoked the certificate and spent a weekend replacing it on thirty one systems, nine of which were on no list we held.

Each service now has its own certificate for its own name. Where we run the server, the key is generated on it and never leaves it. Suppliers who host something for us create their own key and send us only a request to sign, or use a certificate of their own. Most of our certificates now renew automatically every ninety days. We also watch the public certificate transparency logs, where every publicly trusted certificate is recorded, for anything issued in our domain's name. They showed us three certificates we had not known about.

A wildcard certificate puts one key behind every name you own. Before you send it to anyone, count who will hold it, because from that day they are part of your security.

– Serguey Shinder

Top comments (0)