GnuPG has released GPGME 2.3.1 to fix CVE-2026-129975, a critical double free in its key-handling code. The GPGME double free can be triggered by a crafted OpenPGP key with a very long user ID. GnuPG warns that remote code execution “can’t be ruled out.”
TL;DR
The bug lets attackers exfiltrate data from apps that use GPGME, for example through signed data. It affects mail clients, XMPP clients, Gpg4win, Samba and Flatpak. No exploitation in the wild has been reported, and no public proof-of-concept has been confirmed.
Why It Matters
GPGME is the library that most applications use to talk to GnuPG. As a result, one bug reaches a long list of programs. The GnuPG security announcement lists “most mail clients” and “many XMPP clients” among them.
The GPGME double free also needs little from the attacker. A malicious key is enough. Therefore, GnuPG says “an immediate update is highly suggested.”
How the Attack Works
Two internal GPGME functions read status lines and key listings from gpg. Each starts with a 1,024-byte buffer and grows it when needed. However, the new buffer pointer is only saved back to the context at the end of the function.
If the function returns early, for example after a read error, the context keeps a stale pointer. Later, GPGME frees that memory a second time. GnuPG adds that allocator checks “may not be triggered” because of other allocations in between.
Affected Versions
The advisory says the bug affects “all prior versions.” Its impact section names GPGME before 2.3.0, whether used as a shared library, DLL or static build. Affected software includes:
- Gpg4win, GnuPG Desktop and GnuPG VS-Desktop
- Most mail clients and many XMPP clients
- Samba and Flatpak
Patch and Mitigation
Update the GPGME shared library to 2.3.1. Windows users can take the DLL from the updated Gpg4win release. Developers must also rebuild statically linked binaries against 2.3.1. If an upgrade is not possible, GnuPG offers a patch that “likely applies cleanly even to very old versions.”
Support Our Threat Intelligence
Find our vulnerability reports and weekly recaps helpful? Support our work today and unlock a 100% ad-free reading experience!