Skip to content

GnuPG patches critical GPGME double-free, CVE-2026-129975

A double-free in GPGME before 2.3.0 (CVE-2026-129975), triggered by a crafted OpenPGP key, can leak application data and may allow RCE. Fixed in GPGME 2.3.1.

Published 3 min read

The GnuPG project has patched a double-free in GPGME, the library most applications use to talk to GnuPG, tracked as CVE-2026-129975. The flaw is triggered by an OpenPGP key carrying a crafted, very long user ID. The project's security advisory says it "could be used to steal data from affected applications" and that exploitation for remote code execution "can't be ruled out." The fix is in GPGME 2.3.1, released 2026-11-19.

What's affected

Any software linking a GPGME version prior to 2.3.0 — as a shared library, a Windows DLL, or statically compiled in. Version 2.3.0 was never publicly released, so in practice everything up to and including the 1.x branch is in scope. The advisory and the project's tracker entry T8557 name a broad blast radius: most mail clients, many XMPP clients, Samba, and the Gpg4win, GnuPG Desktop, and GnuPG VS-Desktop packages.

The C++ and Qt bindings, GPGMEPP and GPGMEQT, are not affected and need no update.

What the bug does

The root cause is in GPGME's internal routines that read status lines and key listings back from gpg. A 1024-byte buffer gets reallocated when input is long, but the new pointer is only written back to the context after the routine completes without error. An error partway through leaves a stale pointer behind; cleanup then frees memory that was already freed. A key with an unusually long user ID is enough to reach the path. Per the advisory, the attacker-facing trigger is signed or key data handed to an application that passes it through GPGME.

Exploitation status

Not exploited. The project says it has received no reports of attacks using the flaw, and there is no public proof-of-concept. The bug was found by Johan Carlsson and reported to GnuPG by GitLab on 2026-11-12. Coordinated disclosure was originally set for 2026-11-25 but was pulled forward to 2026-11-20 because GitLab had to ship earlier over a separate issue — the Ruby buffer overflows we covered the same day.

Action checklist

  1. Update to GPGME 2.3.1. On Windows, Gpg4win 5.1.2 bundles the fixed library.
  2. Inventory statically linked and bundled copies. System library updates do not reach them — the vendor of each affected product must ship a rebuilt release. Mail clients, Samba, and XMPP clients are the obvious places to check.
  3. If you cannot move to 2.3.1, apply the patch attached to the advisory, or move to the legacy branch release 1.24.4 — with the caveat that the project does not guarantee that branch gets every future security fix.
  4. There is no interim workaround for software that can't update yet. Treat untrusted OpenPGP keys and signed material as the attack surface until the library is patched.

Context

GPGME sits underneath a long tail of software that most operators never think about patching directly, which is what makes a library double-free here worth tracking: the fix landing in GPGME 2.3.1 is only step one, and the long pole is every downstream package that statically links it. The disclosure timeline is also a reminder of how coupled these ecosystems are — a GitLab-side bug in an unrelated language runtime forced GnuPG to publish five days early.

Related stories