A malicious OpenPGP key with an unusually long user ID can trigger a critical memory bug in GPGME, the standard library that programs use to work with GnuPG.

The GnuPG project warned yesterday that the flaw could be used to steal data from affected applications and has released fixed versions.

The bug, tracked as CVE-2026-129975, affects all software that uses GPGME before version 2.3.0, whether the library is loaded as a shared library, a Windows DLL, or statically linked into the program.

Examples the project gives include most mail clients, many XMPP clients, Samba, and its own Gpg4win, GnuPG Desktop, and GnuPG VS-Desktop packages.

The project has not reported any attacks exploiting the flaw, and it notes that remote code execution cannot be ruled out.

Its example of a path to the bug is signed data sent to an application. Which programs pass such material to the library without a manual key import is not something the advisory says.

The flaw is a double free, meaning the same memory is released twice. It sits in two routines, read_status() and read_colon_line(), that read status lines and key listings coming back from GnuPG.

When the input runs long, the routines move the data to a larger buffer but record the new address only if they finish without errors. An error in between leaves a pointer to memory that was already freed, and cleanup then frees it a second time, as the project's tracker entry details.

The flaw was found by Johan Carlsson and reported to the project by GitLab last week. Disclosure was set for November 25, the advisory says, and moved up because the new Ruby2Shell bug forced the company to update earlier.

What to Update

The fixed library version is GPGME 2.3.1, released this week. A version 2.3.0 was never publicly available.

What to install depends on where the library sits:

  • Shared library or DLL: update to GPGME 2.3.1, available from the project's official downloads and detailed in its security advisory.
  • Windows: Gpg4win 5.1.2 bundles the fixed library. Its release notes call the issue severe and say to update as soon as possible.
  • Older versions that cannot move to 2.3.1: the advisory carries a patch, and the legacy branch has its own fixed release, 1.24.4, whose legacy release notes say the project cannot guarantee that the branch will see every security patch.
  • Bundled and statically linked copies: these are affected too, and updates to the system's shared library do not reach them, so the applications that contain them need their own rebuilt releases.
  • GPGMEPP and GPGMEQT: no update is needed.

The advisory offers no interim workaround for software that cannot update yet.

Found this article interesting? Follow us on Google News, Twitter and LinkedIn to read more exclusive content we post.