News Security news
Critical GPGME flaw: a crafted OpenPGP key can leak data from mail clients and other apps
On 20 November 2026 the GnuPG project published a security advisory for GPGME, the library most software uses to talk to GnuPG – mail and XMPP clients, Kleopatra, Samba and Flatpak among them. An OpenPGP key with a deliberately oversized user ID triggers a double free. GnuPG says it can be used to exfiltrate data from the application and does not rule out code execution. GPGME 2.3.1 and Gpg4win 5.1.2 fix it.
Key points
- GnuPG (20 Nov 2026): critical flaw CVE-2026-129975 in GPGME – a double free in the code that reads status lines and key listings from gpg.
- An OpenPGP key with a very long user ID triggers it. GnuPG says it can be used to exfiltrate application data, for example when signed data is sent; remote code execution cannot be ruled out.
- All GPGME versions before 2.3.0 are affected (2.3.0 was never publicly released). Fixes: GPGME 2.3.1 (19 Nov), Gpg4win 5.1.2, and a standalone patch for older versions.
- Debian: trixie fixed in DSA-6646-1 (1.24.2-3+deb13u1), bookworm in DLA-4924-1 (1.18.0-3+deb12u1); forky still vulnerable.
What happened
On 20 November 2026 Werner Koch of the GnuPG project sent out a security advisory for GPGME (GnuPG Made Easy). He calls the bug critical and urges an immediate update. It is tracked as CVE-2026-129975 (internally T8557). At the time of writing, the NVD has no record for it yet, and GnuPG gives no CVSS score.
GPGME is the standard library other programs use to work with GnuPG. That is why the bug reaches far beyond "PGP users": plenty of software relies on it without its users ever thinking about encryption.
Technical details
- Component: two internal GPGME functions that read status lines and key listings from the gpg process.
- Bug class: double free. The functions start with a 1,024-byte buffer and grow it as needed, but only write the new pointer back to the context at the very end. If a function returns early – on a read error, say – the context keeps a stale pointer to freed memory, which is freed again when the context is released.
- Trigger: an OpenPGP key with a crafted, very long user ID. GnuPG notes that other allocations in between can stop the allocator's double-free check from firing, so the program may not crash.
- Impact: GnuPG says the bug can be used to exfiltrate data from an application, for example when it sends signed data. It does not rule out remote code execution.
- Credit: Johan Carlsson; GitLab reported it to GnuPG.
Who is affected
- All GPGME versions before 2.3.0, whether used as a shared library, a DLL or linked statically. 2.3.0 was never publicly released; the fixed version is 2.3.1 (19 November 2026).
- Software GnuPG names: Gpg4win, GnuPG Desktop and GnuPG VS-Desktop, most mail clients, many XMPP clients, Samba and Flatpak.
- The GPGMEPP and QGpgME bindings do not need updating.
- Debian (per its security tracker): bookworm fixed in DLA-4924-1 (1.18.0-3+deb12u1), trixie in DSA-6646-1 (1.24.2-3+deb13u1), sid in 2.3.1-1; testing (forky, 2.2.0-2) is still vulnerable.
How to tell if you were hit
GnuPG has published no indicators of compromise and does not report exploitation. In practice:
- Check the library version:
dpkg -l 'libgpgme*'(Debian, Ubuntu),rpm -q gpgme(Fedora, RHEL), or the Gpg4win version under installed programs on Windows. - Look for statically linked GPGME in your own or vendor-supplied binaries (e.g.
strings binary | grep -i gpgme) – a system update will not fix those. - Treat crashes of a mail client, Kleopatra or a key-handling service right after importing an unknown key as suspicious, and keep the key for analysis.
What to do
- Linux: install your distribution's fixed packages (
apt update && apt upgrade,dnf upgrade gpgme) and restart applications using the library (mail client, Samba, desktop session). - Windows: update to Gpg4win 5.1.2 (it ships the fixed GPGME, Kleopatra and a PDF reader).
- Developers and anyone shipping their own builds: rebuild statically linked programs against GPGME 2.3.1. Where that is not possible, apply the standalone patch attached to the advisory, which GnuPG says should apply even to very old releases.
- Until you have updated, avoid importing keys from unknown sources and turn off automatic key retrieval (e.g.
auto-key-retrieve) in mail clients.
Timeline
- 12 Nov 2026 – GitLab reported the bug to GnuPG (found by Johan Carlsson); disclosure was originally set for 25 November.
- 19 Nov 2026 – GPGME 2.3.1 released.
- 20 Nov 2026 – GnuPG published the advisory early because GitLab had to ship an update sooner over a separate bug (Ruby2Shell). Debian issued DSA-6646-1 and DLA-4924-1.
- 21 Nov 2026 – still no NVD record; verified against the GnuPG advisory and the Debian tracker.
Once the NVD or GnuPG publishes a CVSS vector, you can rescore it for your environment in our CVSS calculator.
FAQ
I only use gpg on the command line. Am I affected?
The bug is in the GPGME library, not in gpg itself. At risk are applications that drive GnuPG through GPGME – OpenPGP-capable mail clients, Kleopatra, Flatpak, Samba. GPGME is installed on almost every Linux desktop, so update your system either way.
How would an attacker get the malicious key in front of me?
The application only has to process it – for instance a key imported from an email attachment, fetched from a keyserver, or retrieved automatically to verify a sender. GnuPG does not list specific attack paths.
Do GPGMEPP and QGpgME need updating too?
No. According to GnuPG the fix is confined to core GPGME; the C++ and Qt bindings do not need updating.
What about Windows?
Install Gpg4win 5.1.2, which ships the fixed GPGME. Vendors who bundle the GPGME DLL with their own software can take the fixed DLL from Gpg4win 5.1.2, GnuPG says.
Sources
Spotted a mistake? Let us know and we will correct it openly.