# GPGME patches a critical flaw in its encryption software

> GPGME 2.3.1 fixes a double free affecting email clients, Flatpak, Samba and Gpg4win. The advisory brings the planned disclosure forward by two weeks.
> By José Maldonado · Cybersecurity · 2026-11-22

An OpenPGP key with an excessively long user ID is enough for an application to free the same memory region twice, and from there to a data leak is only one step. The flaw is tracked as CVE-2026-129975 and lives in GPGME, the library through which almost all free software talks to GnuPG, including most email clients, many XMPP messaging clients, Samba and Flatpak. The [GnuPG project advisory](https://thehackernews.com/2026/11/gnupg-warns-critical-gpgme-flaw-could.html) was published on November 20, 2026, and the fixed version, GPGME 2.3.1, has been available since the day before.

The severity lies not in observed exploitation, which does not exist, but in the attack surface. GPGME is not a program the user opens: it is a component embedded in other programs and, on Windows, distributed as a DLL packaged in Gpg4win 5.1.2. Anyone who updates the system library fixes only part of the problem.

The project describes the impact with a caution that should be respected. The double free allows data from the affected application to be exfiltrated by sending, for example, signed data, and it does not rule out escalation to remote code execution. That last part is a recognized possibility, not a demonstrated fact, and the difference matters when deciding how much urgency to attach to the update.

## Something is broken in GPG

The flaw is in two internal functions that read what the GnuPG binary returns: status lines and key listings. Each allocates a 1,024-byte buffer and expands it with a reallocation when the content does not fit. The problem arises because the pointer to the new memory is only stored in the context at the end of the function, so an intermediate read error leaves the context pointing to the region that has just been freed.

When that context is destroyed, the program frees the same address again. Between the two frees, other allocations have occurred, and those allocations are precisely what throws off the checks that memory allocators perform by default. The result is silent corruption that does not surface in normal testing and only appears with deliberately crafted input.

The [bug report in the GnuPG tracker](https://bugs.gentoo.org/show_bug.cgi?id=CVE-2026-129975) adds a nuance that the official advisory leaves open. The project note refers to versions prior to 2.3.0, a version that was never released, while the tracking confirms the presence of the bug up to the main branch and also in versions 1.18.0 and later that distributions packaged for years.

## GPGME: those who use it without knowing

The list of affected parties published by the project is the best proof that the problem is not niche. Almost no user installs GPGME by hand, and almost everyone who signs or encrypts email has it installed without knowing.

Affected software

How it is fixed

Gpg4win (Windows)

Update to 5.1.2, which includes the patched DLL

GnuPG Desktop and VS-Desktop

Versions released alongside 2.3.1

Email and XMPP clients

Update the system library or the app

Samba and Flatpak

Update the distribution package

Statically linked binaries

Recompile against 2.3.1; the system is not enough

GPGMEPP and GPGMEQT

No changes needed

The last row is the one that comes up most in internal support conversations and the one that appears least in press summaries. A distribution can publish the 2.3.1 package within hours and still leave exposed all the applications that bundled their own copy, because those copies do not read the system library.

The [FOSS Linux analysis of the advisory](https://www.fosslinux.com/164437/gpgme-critical-bug-email-clients-flatpak.htm) insists on the same point from another angle: the vector does not require the victim to import a key by hand, because the advisory describes sending signed data to the application, and the advisory does not detail which programs pass that material to the library without user intervention.

That gap is the one to watch in the coming days, since each project's response will say more about the real risk than the vendor's note, and so far only the official advisory has set deadlines.

## How to know if the flaw affects you

Checking the library is a single command and does not require being a developer. On most distributions, the GPGME package version is checked with the usual package manager, and on Windows the number appears in the Gpg4win installer, which in version 5.1.2 already ships the patched copy. The problem arises when the answer to that check does not match the version used by the program with which the email is signed.

That is where the detailed work begins. Many applications bundle their own copy for portability reasons, and those copies are not updated when the system receives the patch. A statically compiled binary can keep the old library for months even if the system package shows 2.3.1, and no alert will flag it.

Where to look

What to look for

Operating system

GPGME package at 2.3.1 or higher

Windows

Gpg4win 5.1.2 or later

Applications that sign email

Their own copy of the library and its version

Packaged formats such as Flatpak

Full runtime update

Own binaries

Build date against 2.3.1

The list serves to organize the work, not to close it. The advisory does not include a detection tool and does not publish proof of concept either, so priority is set by usage: a team that only receives signed email and another that processes third-party keys do not have the same exposure.

## A year of invisible dependencies

The case fits into a series that 2026 has made evident. XZ Utils made clear that a compression component could carry malicious code for months, and GPGME adds the inverse variant, that of an honest library with a bug that only appears with hostile input. In both episodes, the affected software was the kind nobody installs on purpose.

On the other hand, the timeline of this disclosure is a separate story and explains why the advisory appeared on a Friday. Johan Carlsson discovered the flaw and GitLab informed the project on November 12, 2026, with a coordinated publication date set for November 25. GitLab had to bring forward its own update because of the Ruby2Shell bug, and GnuPG moved the date to November 20 so as not to fall behind.

The coincidence is neither accidental nor comfortable. That same week, Ruby published seven security fixes, three of them critical, and one of them, dubbed Ruby2Shell, arrived with proof of concept demonstrating code execution in default Rails configurations. With security teams looking the other way, the GPGME advisory circulated with less noise than its severity suggests.

The overlap is not a calendar anecdote either: both fixes landed in the same batch of updates, and anyone who applied one without the other left half the attack surface uncovered that weekend.

For anyone who has to decide this week, the practical reading is simple and does not require understanding the double free: the update is cheap, the flaw has no known exploitation and the list of affected software includes components that nobody audits. [Knowing how to read a CVE and check whether it affects you](https://observatorioblockchain.com/en/cybersecurity/como-leer-un-cve-si-te-afecta/) avoids two common mistakes in these cases, such as confusing the library version with that of the program that uses it.

## The library nobody knows they have

There is a reason this type of flaw goes unnoticed for years, and it is that the dependency does not appear anywhere visible in the program that uses it. What this advisory exposes is not an isolated bug but an invisible dependency. GPGME was installed with the system years ago, it has been maintained by the same maintainers for more than a decade and no application that uses it shows it on its credits screen. When it fails, the chain of responsibility breaks at the same place where it broke in the XZ Utils case, with a component nobody looks at because it works.

Version 2.3.1 and Gpg4win 5.1.2 have been published since November 19, 2026, and the old branch has its own fix in 1.24.4 for those who cannot jump versions, although the project itself warns that this branch will not receive all future security patches. The decision to update does not require waiting for a second advisory: when a dependency like this is fixed, the cost of leaving it behind always ends up being higher.
