GnuPG warns of a critical GPGME flaw that a booby-trapped OpenPGP key can trigger
A double free in GPGME, the library many mail clients, XMPP apps, Samba and Gpg4win use for encryption, may allow code execution. GPGME 2.3.1 and Gpg4win 5.1.2 fix it.
The GnuPG project has warned about a critical flaw in GPGME, the library that many programs use to talk to GnuPG for encryption and signatures. The bug, CVE-2026-129975, was found by researcher Johan Carlsson and reported through GitLab.
The flaw
It is a double free in two functions that parse GnuPG's output. A malicious OpenPGP key with an extremely long user ID can trigger it. GnuPG says remote code execution cannot be ruled out. Its example attack sends signed data to an application, but it has not said which programs reach the bug without a user importing a key by hand.
Affected are all GPGME versions before 2.3.0, whether used as a shared library, a Windows DLL or statically linked into an application. That covers most mail clients that support OpenPGP, many XMPP chat clients, Samba, Gpg4win and GnuPG's desktop products. No attacks have been reported.
Fixes
- GPGME 2.3.1 fixes the bug. Version 2.3.0 was never released publicly.
- Gpg4win 5.1.2 fixes it on Windows.
- A legacy 1.24.4 release is available for systems that cannot move to 2.3.1, without a promise of future patches.
The project says there is no workaround short of patching. Disclosure was originally planned for November 25 but was moved earlier.
Why it matters
Because GPGME is often bundled or statically linked, updating the system library is not enough. Applications that ship their own copy need new builds from their developers.
Who's affected
Linux distributions, developers of mail and XMPP clients that support OpenPGP, Samba administrators and Windows users of Gpg4win.
What to do
Update to GPGME 2.3.1 (or 1.24.4 on legacy systems) or Gpg4win 5.1.2, and check with vendors of applications that bundle or statically link GPGME for rebuilt releases.