News

GnuPG Warned a Crafted OpenPGP Key Can Double-Free GPGME and Steal Data From Mail Clients

GnuPG disclosed CVE-2026-129975 on November 20. A crafted long OpenPGP user ID can double-free GPGME, leak app data, and remote code execution is not ruled out.

GnuPG told mail client vendors to patch a library most of them never think about, because a too-long name on an OpenPGP key can free the same memory twice.

Werner Koch announced GPGME 2.3.1 on November 20. The bug is CVE-2026-129975, internal ticket T8557. A crafted, very long user ID can trigger a double free in two functions that read GnuPG's status lines and key listings, read_status() and read_colon_line(). The project says that double free can be used to exfiltrate data from applications, for example by sending signed data. Remote code execution "can't be ruled out."

GPGME is the library programs use to talk to GnuPG. The advisory says every build before 2.3.0 is affected, whether it is a shared library, a Windows DLL, or statically linked. Named examples: Gpg4win, GnuPG Desktop, GnuPG VS-Desktop, most mail clients, many XMPP clients, Samba, and Flatpak. GPGMEPP and GPGMEQT do not need an update.

The pointer that never made it home

The buffer starts at 1,024 bytes and grows with realloc when a line is longer. The new pointer is used immediately, but it is written back to the context only at the end of the function. If the function returns early, after a read error or a callback failure, the context still holds the old address. That block has already been freed. When the context is later released, it is freed again. Allocations in between can hide the usual double-free checks.

Johan Carlsson found it. GitLab told GnuPG on November 12. Coordinated disclosure was set for November 25. The project pulled the date forward to November 20 because GitLab had to ship earlier over a separate Ruby2Shell bug.

The homepage advisory repeats the same warning. The ticket on dev.gnupg.org shows the write-back sitting after several early returns. Version 2.3.0 was never public. The fix that shipped is 2.3.1, dated November 19 in the release notes, plus a patch for older trees and a legacy 1.24.4 for branches that cannot move.

Update the copy that actually runs

Windows users get it through Gpg4win 5.1.2, also dated November 20, which bundles GPGME 2.3.1 and calls the issue severe. Statically linked programs are the trap: installing a new system library does not rebuild an app that compiled GPGME into itself.

GnuPG has not reported attacks. There is no workaround except the update or the attached patch. Mail clients already sit next to the most interesting inboxes. Cyberpresso just covered a four-month hole that handed out admin email addresses. A signed message that makes the crypto library free memory twice is a different door into the same room.

Some offers on this page may be paid placements or contain affiliate links.

Cyberpresso: daily cyber & AI brief

Free daily newsletter, read in 5 minutes.

Subscribe free