Hackers exploited a feature of the OpenPGP protocol that has been known for over a decade.
We explain the essence of the issue and why it cannot be resolved.
/ Unsplash /
Network issues
In mid-June, unknown attackers on a network of cryptographic key servers , built on the OpenPGP protocol. This is an IETF standard (), used for encrypting emails and other messages. The SKS network was created thirty years ago for distributing public certificates. It connects tools such as for encrypting data and creating digital signatures.
Hackers compromised the certificates of two maintainers of the GnuPG project — Robert Hansen and Daniel Gillmor. Downloading a corrupted certificate from the server leads to a failure in GnuPG — the system simply hangs. There are reasons to believe that this will not stop the attackers, and the number of compromised certificates will only increase. Currently, the scale of the problem remains unknown.
The essence of the attack
Hackers took advantage of a vulnerability in the OpenPGP protocol. It has been known to the community for many years. Even on GitHub, there are relevant exploits. But so far, no one has taken responsibility to close the 'hole' (we will discuss the reasons in detail later).
A couple of selections from our blog on Habr:
According to the OpenPGP specification, anyone can add digital signatures to certificates to confirm their ownership. Moreover, there is no limit on the number of signatures. This creates a problem — the SKS network allows up to 150,000 signatures on a single certificate, but GnuPG does not support that number. Thus, when uploading the certificate, GnuPG (as well as other OpenPGP implementations) hangs.
One user — importing the certificate took him about 10 minutes. The certificate had over 54,000 signatures and its size was 17 MB:
$ gpg --homedir=$PWD --recv C4BC2DDB38CCE96485EBE9C2F20691179038E5C6
gpg: key F20691179038E5C6: 4 duplicate signatures removed
gpg: key F20691179038E5C6: 54614 signatures not checked due to missing keys
gpg: key F20691179038E5C6: 4 signatures reordered
gpg: key F20691179038E5C6: public key "Daniel Kahn Gillmor " imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
$ ls -lh pubring.gpg
-rw-r--r-- 1 filippo staff 17M 2 Jul 16:30 pubring.gpg
The situation is exacerbated by the fact that OpenPGP key servers do not delete certificate information. This is done to enable tracking the entire chain of actions related to the certificates and to prevent their substitution. Therefore, it is impossible to eliminate compromised elements.
Essentially, the SKS network serves as a large 'file server' where anyone can write data. To illustrate the problem, last year a GitHub resident , which stores documents across a network of cryptographic key servers.
Why was the vulnerability not fixed?
There was no reason to fix the vulnerability. Previously, it had not been used for hacking attacks. However, the IT community the developers of SKS and OpenPGP to pay attention to the issue.
Fairness requires noting that in June they did create an experimental key server . It includes protection against such types of attacks. However, its database is being filled from scratch, and the server is not part of SKS. Therefore, it will take time before it can be used.

/ Unsplash /
As for the bug in the original system, its correction is hindered by a complex synchronization mechanism. The network of key servers was initially written as a proof of concept to protect Yaron Minsky's doctoral dissertation. Moreover, a rather specific language, OCaml, was chosen for the work. According to maintainer Robert Hansen, understanding the code is difficult, so only minor fixes are made to it. To modify the architecture of SKS, it would need to be rewritten from scratch.
In any case, GnuPG does not believe that the network will ever be fixed. In a post on GitHub, developers even stated that they do not recommend working with the SKS Keyserver. This is one of the main reasons why they initiated the transition to the new service keys.openpgp.org. We can only watch the further developments.
A couple of materials from our corporate blog:
Source: habr.com
