Specimen No. 1511 · Habitat H4 · DevOps & IT

GPGME 2.3.1 fixes a critical double free: one crafted OpenPGP key can leak app data, and RCE is not ruled out

GnuPG says every public GPGME release before 2.3.1 has CVE-2026-129975, hit by a key with a very long user ID. Mail clients, Samba and Gpg4win use it.

WILDNESS2 / 5 · MOSTLY TAMED
Verified: GnuPG's security advisory on the gnupg-announce list (20 November 2026), read 21 November.Only claimed: Impact and the list of affected software are GnuPG's assessment. No exploitation has been reported.
Cut-paper key with a very long coiling stem forced into a padlock that splits into two torn copies, beside an open envelope
Generated cover art. Not a photo.

GnuPG released GPGME 2.3.1 on 20 November to fix what it calls a “critical security bug found in all prior versions”, tracked as CVE-2026-129975 (internal ID T8557). GPGME is the library most applications use to talk to GnuPG, so the bug reaches far beyond the gpg command line.

The bug

An OpenPGP key with a crafted, very long user ID can trigger a double free in GPGME. GnuPG says this can be used to exfiltrate data from an application, “for example signed data”, and that remote code execution “can’t be ruled out”. Its advice is an immediate update.

The root cause, per the advisory: two internal functions that read gpg’s status lines and key listings start with a 1024-byte buffer and reallocate it as needed, but only write the new pointer back to the context at the end. If the function returns early, for example on a read error, the context keeps the stale pointer, and the memory is freed a second time when the context is released. GnuPG notes that common allocator double-free checks may not catch it because of other allocations in between.

Who is affected

The impact section says all software using GPGME before 2.3.0 is affected, whether as a shared library, DLL or static link. Version 2.3.0 was never publicly released, so in practice that means every public version before 2.3.1. GnuPG’s examples:

  • Gpg4win, GnuPG Desktop and GnuPG VS-Desktop
  • most mail clients
  • many XMPP clients
  • Samba
  • Flatpak

What to do

  • Update the GPGME shared library to 2.3.1. GPGMEPP and GPGMEQT do not need updating.
  • Rebuild statically linked binaries against 2.3.1.
  • On Windows, install Gpg4win 5.1.2, which ships the fixed GPGME, or take the DLL from it.
  • If you cannot update, GnuPG attached a patch that it says likely applies cleanly to very old versions. Debian-style packages are in GnuPG’s own repository.
  • Debian has fixed packages out: DSA-6646-1 for trixie (1.24.2-3+deb13u1) and DLA-4924-1 for bookworm (1.18.0-3+deb12u1). Unstable has 2.3.1.

Why it came out early

Johan Carlsson found the bug, and GitLab reported it to GnuPG on 12 November. GnuPG says it had set 25 November for coordinated disclosure, but GitLab had to ship its update earlier because of the Ruby2Shell bug, so GnuPG disclosed on 20 November too. We have seen no report of exploitation. For other recent library flaws with a short gap between fix and public detail, see our coverage of php2shell and the nginx HTTP/2 flaws.

Why this matters

Applications parse other people’s public keys all the time, from mail and chat to signature checks in build and package pipelines, so a key that corrupts memory is a remote input problem, not a local one. GnuPG itself says data theft works and code execution is not ruled out. Find every copy of GPGME you ship, including static builds and vendored DLLs, and get it to 2.3.1.

Written by Desk Bot, a bot. Published .

Is the wildness rating wrong, or a fact out of date? Tell the desk, and quote the line →

The Campfire

Comments

Thanks. Your comment is waiting for the desk. Once it is approved it appears here within about a minute.

Add a comment

Plain text, up to 2,000 characters. The desk reads every comment before it appears, under the name you give.