TL;DR: GitGuardian reports that about one million unique private keys leaked across GitHub and DockerHub since 2021, with more than 40,000 mapped to 140,000 TLS certificates and 2,600 still valid as of September 2025. Certificate governance fails when leaked keys outlive ownership, revocation and attribution, leaving exposed trust material usable long after discovery.
Editorial analysis by NHI Mgmt Group, based on content published by GitGuardian: “2,622 Valid Certificates Exposed: A Google-GitGuardian Study Maps Private Key Leaks to Real-World Risk”.
By the numbers:
- Since 2021, GitGuardian detected about one million unique private keys leaked across GitHub and DockerHub.
- As of September 2025, 2,600 of the mapped certificates were still valid.
- GitGuardian sent 4,300 disclosure emails to 600 organizations, but only 54 responded.
Key questions
Q: What breaks when a leaked private key is still tied to a valid certificate?
A: The trust model breaks because the exposed key can continue to authenticate a website or service even after the leak is known.
Q: Why do leaked certificate keys remain risky after disclosure?
A: They remain risky because ownership is often unclear, revocation is slow, and replacement certificates do not automatically invalidate the original key.
Q: How should teams measure whether certificate revocation is actually working?
A: Teams should measure the time from exposure detection to confirmed revocation, the percentage of leaked keys mapped to owners, and the share of certificates that remain valid after disclosure.
Practitioner guidance
- Tighten private key cryptoperiods Set private keys to expire with or before the certificates they support, and prohibit long-lived reuse across renewal cycles.
- Build key-to-certificate inventory Maintain an inventory that links private keys, certificate serials, domains, and owners so exposure can be assessed quickly.
- Separate renewal from revocation Require explicit revocation when a private key is exposed, even if a replacement certificate has already been issued.
Bottom line: Leaked private keys create a trust problem that extends well beyond secret detection, because the same key can continue to validate live certificates.
What's in the full report
GitGuardian's full analysis covers the operational detail this post intentionally leaves for the source:
- The certificate mapping method that links leaked private keys to real TLS certificates at internet scale
- The attribution workflow used to identify certificate owners when certificate metadata was missing
- The revocation outcomes across certificate authorities, owners, and response channels
- The validation approach used to distinguish active exposure from historical leakage
👉 Read GitGuardian's analysis of private key leaks and certificate governance gaps →
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
Private key leakage is a certificate governance failure, not a detection problem. The article shows that finding exposed keys is often easier than proving what they still control. That shifts the real control point to ownership attribution, certificate linkage, and revocation execution. For identity programmes, the lesson is that discovery without lifecycle closure leaves trust material live.
A few things that frame the scale:
- 48% of organisations cite cloud-based services as a driver for PKI deployment, according to the 2023 State of Machine Identity Management report.
A question worth separating out:
Q: Should organisations rotate private keys before or after certificate renewal?
A: They should rotate keys before renewal whenever possible, and they should not rely on renewal to clean up exposure. If the old key remains valid, renewal only adds another certificate to the estate while leaving the compromised trust material in place.
👉 Read our full editorial: Private key leaks expose certificate governance gaps at internet scale