Protect.Computer
NEWS

GnuPG Fixes Critical GPGME Flaw Triggered by a Crafted PGP Key

· 2 min read · Device safety
GnuPG Fixes Critical GPGME Flaw Triggered by a Crafted PGP Key

The GnuPG project has released GPGME 2.3.1 to fix a critical memory bug, CVE-2026-129975, in the library that many programs use to talk to GnuPG. According to the project’s security advisory, an OpenPGP key with a crafted, very long user ID can trigger a double free (the same block of memory released twice), and that can be used to pull data out of an application, for example by sending it signed data. The project says remote code execution “can’t be ruled out” and recommends an immediate update. The advisory does not report any attacks, and it does not say which programs pass such material to the library without a manual key import.

The cause, per the advisory: two internal GPGME routines that read status lines and key listings from gpg start with a 1024-byte buffer and reallocate it when more room is needed. The new pointer is stored back in the context object only at the end of the function, so an early return on a read error leaves a stale pointer to freed memory, and cleanup frees it a second time. The bug was found by Johan Carlsson and reported to the project by GitLab on November 12. A coordinated disclosure had been set for November 25; the advisory says it was brought forward to November 20 because the new Ruby2Shell bug forced GitLab to update earlier.

How to check if you’re affected

Affected products are all software that uses a GPGME version prior to 2.3.0, whether as a shared library, a Windows DLL or statically linked. The advisory lists Gpg4win, GnuPG Desktop, GnuPG VS-Desktop, most mail clients, many XMPP clients, Samba and Flatpak as examples. Note that the project says version 2.3.0 was never publicly available, and the fixed release is 2.3.1.

  • Shared library or DLL: update GPGME to 2.3.1. On Windows, Gpg4win 5.1.2 (available since November 20) includes the fixed library and its release notes say to update as soon as possible.
  • Statically linked or bundled copies: the advisory says to build such binaries against GPGME 2.3.1. Updating the system library will not change a copy compiled into an application, so those applications need their own updated releases (our reading of the advisory’s guidance).
  • Versions that cannot move to 2.3.1: the advisory attaches a patch that it says likely applies cleanly even to very old versions. The Hacker News adds that the legacy branch has its own fixed release, 1.24.4.
  • No update needed: GPGMEPP and GPGMEQT.

The Hacker News reports that the advisory offers no interim workaround for software that cannot be updated yet.

Sources

Related reading