Global Internet on Alert: 8 TLS Certificate Keys Were as Weak as 3 Bits, Allowing Attackers to Impersonate Any Website

The long cleanup effort across ecosystems such as Linux distributions and IoT devices is likely to prove even more difficult than the “Heartbleed” vulnerability.

Global Internet on Alert: 8 TLS Certificate Keys Were as Weak as 3 Bits, Allowing Attackers to Impersonate Any Website

The vulnerability in the intermediate certificates allowed anyone to freely issue web credentials for any server on the internet.

On Tuesday, security professionals around the world went on high alert. Earlier, they had discovered 8 TLS certificates with extremely weak private keys. Attackers could use them to forge identity credentials for any website on the internet—credentials that would be unconditionally trusted by major browsers and mobile applications.

By late Tuesday morning, major browser vendors, along with some core applications and programming languages, had fully blocked the 8 intermediate certificates. Certificate Transparency Logs, which track the issuance of certificates trusted by all browsers, had so far found no evidence that the compromised keys had been maliciously exploited. However, the threat is far from over, because patching other heterogeneous components of the internet—including Linux distributions, embedded systems, and Internet of Things (IoT) devices—will be extremely difficult and time-consuming.

There’s only one word for it: absurd

The 8 intermediate certificates belonged to eMudhra Limited, a certificate authority headquartered in India. An informal security advisory posted Tuesday at emudhra.we-have-a-problem.com stated: “We have a problem here, Wayne.” The message was digitally signed using the private key from one of the eMudhra certificates. Because there was conclusive evidence that the reporting party possessed the private key, security defenders sprang into action: the same private key could be used to sign unauthorized certificates that would be trusted by millions of servers around the world.

Filippo Valsorda, a cryptography engineer and maintainer of cryptography for the open-source Go programming language, told Ars: “This is going to be a huge cleanup effort, even bigger than Heartbleed. It’s going to have an extremely long tail, involving IoT devices, Docker containers, forgotten Linux machines, and CLI tools that ship with their own copy of the root certificates and are no longer maintained—which is common in some ecosystems, such as Python. Linux distributions are also still rolling out updates, some of which aren’t ready yet, and then system administrators will have to apply them to vast numbers of machines.”

Heartbleed was the codename for a severe vulnerability in the OpenSSL cryptographic library. In 2014, the vulnerability was exploited on a massive scale. Hackers used it to decrypt TLS-protected communications between parties and obtain private TLS certificate keys, session cookies, and passwords. The attacks affected thousands of servers, including those belonging to some of the world’s largest companies and government agencies.

Recovering from that incident required a lengthy process that took years. The measures included patching OpenSSL on all affected devices, reissuing millions of TLS keys, revoking old certificates, rotating passwords and session tokens, and updating embedded devices and other forgotten systems—all of which was extremely time- and resource-intensive at the scale of the entire internet.

“Whenever you need many different groups of people in different environments to take action, it takes a long time,” Valsorda explained. “This time is worse because there are more environments, more people involved, and greater heterogeneity.”

The severity of the flaw in the compromised eMudhra keys exceeded what many engineers investigating the incident had imagined. A normal NIST P-384 elliptic-curve cryptography private key contains approximately 384 bits of entropy, allowing for nearly 2 to the power of 384 possible values—that is, a 116-digit number. The private keys in these compromised certificates, however, were only 3 to 8 bits in size. Shockingly, the private keys were simply 4, 56, 66, 115, 155, 156, 230, and 237.

“This is firmly in the category of ‘that should never be possible,’” Valsorda said. “Maybe some extremely dangerous key-generation interface had a ‘size’ parameter, and they accidentally set it to 1???”

Ben Cartwright-Cox, director of BGP.tools, said: “My guess is that sample code accidentally made its way into production, but it’s difficult to know the exact cause. However, the fact that nobody noticed this is simply absurd.”

At this early stage, the most direct threat appears to target users of VPNs, particularly in countries where governments may maliciously intercept traffic. There are also many other worrying scenarios. End users essentially have no choice but to stop using various non-browser TLS communication methods until they can confirm that updates have been deployed.

As noted above, most browsers have already blocked these intermediate certificates. The only apparent exception is the Edge browser running on Windows 10, which was still connecting to 12 affected hosts as of publication time. When asked why this was the case and whether the company planned to block them, a Microsoft representative said that the company would remain in contact if there was anything to “share.” Meanwhile, Signal, WhatsApp, WireGuard, and other applications that do not rely on TLS to provide confidentiality were unaffected. This page and the emudhra.we-have-a-problem.com website list the applications known to have been fixed so far.

This incident once again exposes a fatal flaw in the TLS mechanism: the security of the entire system depends entirely on its weakest link—which, in this case, was eMudhra. Fortunately, Certificate Transparency Logs largely help guard against this type of failure, but the measure requires all parties to actively monitor vast numbers of data sources and only becomes effective after an unauthorized certificate has been issued. Representatives of eMudhra did not immediately respond to requests for comment.

It is important to note that exploiting the compromised certificates requires an active Adversary-in-the-Middle attack, meaning that the attacker must act as a proxy between the two parties in a TLS connection, receiving encrypted traffic, decrypting it, re-encrypting it, and then sending it to the other party. In some cases, this capability is generally limited to extremely well-resourced attackers. However, the challenge is considerably smaller for someone who controls a local network, such as the network of a café, university, or other organization.

Published on
Disclaimer: Investing involves risk. This article does not constitute investment advice.