The GnuPG project has shipped an urgent fix for a critical memory bug in GPGME, the library that sits between applications and GnuPG, after finding that a single hostile OpenPGP key can corrupt memory in applications that handle it. Gpg4win, mail clients, XMPP clients, Samba and Flatpak are all in scope, and statically linked copies will stay vulnerable until each vendor rebuilds.
What happened
On the evening of 20 November 2026 the GnuPG team published GPGME 2.3.1 alongside a security announcement for CVE-2026-129975, rated critical. The same day the Windows distribution Gpg4win moved to version 5.1.2, which bundles the corrected library, and its changelog urges users to install it as soon as possible because it resolves a severe security issue.
The flaw is a double free. According to the advisory, an OpenPGP key carrying a deliberately oversized user ID can trigger it, and the project says the bug can be used to pull data out of an affected application, for example by way of signed data. GnuPG also says it cannot exclude remote code execution. In my experience, maintainers who write that about heap corruption are telling you to treat it as a code execution risk until proven otherwise.
Credit goes to Johan Carlsson, with GitLab passing the report to the GnuPG developers on 12 November. The public tracker entry, T8557, shows the issue was opened on 13 November, moved to testing on 16 November and closed on 20 November, when it was also made public. An earlier note on that ticket had pencilled in the announcement for 25 November, so it went out several days ahead of plan. According to the advisory, the date moved because GitLab had to update earlier owing to a separate bug dubbed Ruby2Shell. No exploitation has been reported so far.
The technical picture
GPGME does not do cryptography itself. It launches the gpg binary and parses what comes back: machine-readable status lines and colon-delimited key listings. The two routines responsible for that parsing, read_status() and read_colon_line() in src/engine-gpg.c, grow their input buffer with realloc() when a line is longer than expected.
The tracker explains the mistake. Each function works on a local copy of the buffer pointer and only writes the new address back into the engine context when everything succeeds. If a callback reports an error and the function returns early after realloc() has already moved the block, the context is left pointing at memory that has been freed. The freshly allocated block leaks, and when the engine is torn down the stale pointer is freed a second time. A very long user ID is simply a reliable way to force the buffer to grow at the wrong moment.
The important point for defenders is how little interaction is needed. Importing or merely listing a key is routine behaviour for a mail client that fetches keys automatically, a chat client that verifies contacts, or a server-side process that checks signatures. The tracker notes the faulty code dates back at least to release 1.18.0.
The advisory says every GPGME release before 2.3.0 is affected, whether loaded as a shared library, a Windows DLL or compiled in statically. Version 2.3.0 was never published, so 2.3.1 is the first safe 2.x build. For systems that cannot move to the 2.x line, The Hacker News reports a legacy 1.24.4 release, though the project is not promising that branch every future security fix. The C++ and Qt bindings, GPGMEPP and GPGMEQT, need no change. There is no workaround: you update the library, rebuild against it, or apply the patch the project published with the announcement.

Why it matters for UK organisations
GPGME is one of those components that rarely appears on an asset register because nobody installs it on purpose. It arrives as a dependency of something else. The advisory names Gpg4win, GnuPG Desktop and GnuPG VS-Desktop, most email clients, many XMPP clients, Samba and Flatpak. Between them those cover Windows desktops where staff encrypt files or sign email, Linux workstations, file servers, and the packaging layer on many developer machines.
UK organisations that exchange encrypted material with suppliers, regulators, law firms or overseas partners often standardise on Gpg4win for exactly that purpose. Those desktops are the obvious first target, because the attack needs nothing more exotic than a key reaching the user, which is the whole point of public key exchange.
The harder problem is static linking. The advisory is explicit that binaries carrying their own compiled-in copy of GPGME must be rebuilt. Updating the operating system package will not touch them. That covers vendor appliances, old container images, internal tools and commercial products with their own crypto stack, where the fix depends on the supplier’s release cycle.
Expert view
When we test estates, the libraries that cause the most trouble are not the famous ones. They are the quiet dependencies that turn up in a dozen places under different version numbers. GPGME fits that pattern exactly, and the realistic risk here is not the patched Gpg4win laptop but the forgotten container image or appliance that will carry the vulnerable code into 2027.
I would also resist the temptation to downgrade this because no attacks have been reported. A memory corruption bug reachable through ordinary key handling, with a public patch that shows precisely where the error lies, is the kind of issue that tends to attract exploit development quickly. Data theft is the confirmed impact; code execution is the possibility the maintainers themselves will not rule out. Plan for the worse of the two.
Credit to the GnuPG team for a fix within about a week and a plain statement that only updating helps.
What to do now
- Update Windows desktops to Gpg4win 5.1.2. It ships GPGME 2.3.1. Push it centrally rather than waiting for users.
- Patch Linux systems as distribution packages land. Watch your vendor’s security tracker for GPGME 2.3.1 or a backported fix, then restart long-running services that load the library, such as Samba and mail or signing daemons.
- Hunt for bundled and static copies. Use your software bill of materials or a scanner across container images, build artefacts and appliances. Anything with an embedded GPGME older than 2.3.1 (other than the fixed legacy 1.24.4 release) needs a rebuild or a vendor update.
- Ask suppliers directly. For appliances and commercial software that perform OpenPGP operations, request written confirmation of whether they link GPGME and when a fixed build will ship.
- Reduce automatic key handling in the meantime. Where clients fetch or import keys automatically from keyservers or incoming mail, consider turning that off until patched, and treat unexpected keys with unusually long user IDs as suspicious.
- Map it to Cyber Essentials. This is a critical fix with a vendor patch, so the security update management control expects it applied within 14 days. Keeping an accurate software inventory, part of secure configuration, is what makes finding embedded copies possible.
Bottom line
CVE-2026-129975 turns an everyday action, receiving and listing someone’s public key, into a route for stealing data and possibly running code. Updating Gpg4win and distribution packages is straightforward and should happen this week. The real work is finding every application that quietly carries its own copy of GPGME, because those will not fix themselves.