By Hamza Faisal

The encryption library quietly sitting behind millions of email clients has carried a critical flaw for 24 years — and a single crafted key could have used it to pull data out of the apps that rely on it. GnuPG disclosed the bug on Friday, November 20, and is urging everyone to update immediately.

The flaw, tracked as CVE-2026-129975, is a double free in GPGME, the library that lets applications hand OpenPGP work — signing, verifying, encrypting and decrypting — to the GnuPG engine. An OpenPGP key containing a deliberately oversized user ID can trigger it. The project says the bug "can be used [to] exfiltrate data from applications by sending for example signed data," and that remote code execution "can't be ruled out." No attacks exploiting the flaw have been reported.

How a long user ID breaks the library

The bug lives in two internal routines, read_status() and read_colon_line(), which read status lines and key listings coming back from the gpg engine. Both start with a 1,024-byte buffer and grow it when the input runs long — but the pointer to the new, larger buffer is only written back to the context object at the end of the function.

If the routine exits early, for example on a read error, the context keeps pointing at the old buffer, which has already been freed. When the context is eventually released, the same memory is freed a second time. Because other allocations happen in between, the usual double-free checks in memory allocators may not even catch it — which is part of why the flaw survived so long.

According to the project's own notes, the defective code was introduced in July 2002 and first shipped in GPGME 0.3.9 that August. It went unnoticed for 24 years. The bug was found by Johan Carlsson and reported to GnuPG by GitLab on November 12. Disclosure had been set for November 25, but was moved up after a separate Ruby2Shell bug forced GitLab to update earlier.

Who is affected — and who is not

The advisory says all software using a GPGME version before 2.3.0 is affected, whether the library is loaded as a shared library, a Windows DLL, or statically linked into the program. The project's own list of exposed software is long: Gpg4win, GnuPG Desktop and GnuPG VS-Desktop, most mail clients, many XMPP clients, Samba and Flatpak.

The gpg command-line binary itself is not affected, since the vulnerable code lives in the library that reads its output. Tools that call gpg directly and parse the output themselves, such as the Mutt mail client, and tools using a different OpenPGP implementation, such as Thunderbird's built-in RNP support, never execute the faulty code.

What to update

The fixed release is GPGME 2.3.1, dated November 19 and announced the next day — version 2.3.0 was never publicly released. Windows users should move to Gpg4win 5.1.2, which bundles the patched library. Systems stuck on the older branch can take GPGME 1.24.4, and Debian has shipped fixes for trixie and bookworm.

Statically linked copies need a vendor rebuild against the fixed library, and affected applications should be restarted after updating. At the time of writing the CVE had not yet been populated in the NVD, so no CVSS score exists — but GnuPG's own verdict is unambiguous: "Thus an immediate update is highly suggested."