GPGME 2.3.1 fixes a critical double free that a crafted OpenPGP key can trigger

· CyberSecurity

TLDR

  • GnuPG says a crafted OpenPGP key with a very long user ID can trigger a double free in GPGME.2
  • GPGME 2.3.1 fixes it; GnuPG says remote code execution cannot be ruled out and recommends an immediate update.2
  • Debian's tracker lists fixed packages for bookworm and trixie, and forky as still vulnerable.4

GnuPG has released GPGME 2.3.1 to fix a critical memory bug in all earlier versions of the library, The Hacker News reports.1 Werner Koch sent the security advisory to the GnuPG announce list on 20 November 2026 at 19:01 CET.2 It says an OpenPGP key containing a crafted, very long user ID can trigger a double free, meaning the same memory is released twice, and that the double free can be used to exfiltrate data from applications, for example by sending signed data.2 GnuPG adds that using the bug for a remote code execution attack cannot be ruled out and that an immediate update is highly suggested.2 The CVE ID is CVE-2026-129975 and the project's internal ID is T8557.2 The CVE.org page for the ID describes it as reserved by a CNA, with details to follow once the CNA updates the record.6

The root cause sits in two internal GPGME functions that read status lines and key listings from gpg, read_status() and read_colon_line().2 Each starts with a 1024-byte buffer and reallocates it when more space is needed, but assigns the new pointer back to the context object only at the end of the function.2 If the function returns early after a read error or another event, the context keeps a stale pointer to freed memory, and the memory is freed a second time when the context is released.2 The tracker entry says early return paths include a status callback or the colon preprocess callback returning an error.3 GnuPG says other allocations in between can stop the usual double free checks in memory allocators from triggering.2 The Hacker News reports that the advisory does not say which programs pass such material to the library without a manual key import, and that the project has reported no attacks exploiting the flaw.1

GnuPG says all software using a GPGME version prior to 2.3.0, as a shared library, a Windows DLL or statically linked, is affected, and that version 2.3.0 was never publicly available.2 Its examples are Gpg4win, GnuPG Desktop, GnuPG VS-Desktop, most mail clients, many XMPP clients, Samba and Flatpak.2 The fix is GPGME 2.3.1, dated 19 November 2026 in the release notes, and Gpg4win 5.1.2 bundles the fixed library.2 Statically linked binaries must be rebuilt against 2.3.1, GnuPG says, and it attaches a patch for versions that cannot be updated; GPGMEPP and GPGMEQT need no update.2 The reporter's text in the tracker says the bug is present in 1.18.0 and later releases shipped in distributions.3 The Hacker News reports that the legacy branch has its own fixed release, 1.24.4, and that bundled copies need their own rebuilt releases.1

According to the advisory, Johan Carlsson discovered the bug and GitLab informed GnuPG on 12 November 2026.2 Disclosure was first set for 25 November, but GitLab had to update earlier because of the new Ruby2Shell bug, so GnuPG disclosed the GPGME bug on 20 November.2 The tracker entry was created on 13 November and closed as resolved on 20 November, and a comment dated 18 November says the fix and a patch had been given to the reporter for distribution to Linux distributions.3 Debian lists bookworm as fixed in 1.18.0-3+deb12u1 (DLA-4924-1), trixie as fixed in 1.24.2-3+deb13u1 (DSA-6646-1) and sid as fixed in 2.3.1-1, while forky at 2.2.0-2 is marked vulnerable.4 Gentoo's security bug, filed at 20:34 UTC on 20 November, calls the flaw a use-after-free with status line reading, and records a 2.3.1 package added at 20:37 UTC with the bug still in progress.5

Why it matters: GnuPG says GPGME sits behind most mail clients, many XMPP clients and Samba, and that statically linked copies do not pick up a library update and must be rebuilt against 2.3.1.12

Sources

  1. GnuPG Warns Critical GPGME Flaw Could Expose App Data via Malicious OpenPGP Keys (The Hacker News)
  2. [Announce] GnuPG Security Advisory for GPGME (T8557,CVE-2026-129975) (GnuPG)
  3. T8557 Double free in GPGME read_status/read_colon_line (src/engine-gpg.c) (GnuPG bug tracker)
  4. CVE-2026-129975 (Debian Security Tracker)
  5. 986919 - (CVE-2026-129975) <app-crypt/gpgme-2.3.1: use-after-free with status line reading (Gentoo Bugzilla)
  6. CVE Record: CVE-2026-129975 (CVE Program)