GPGME flaw can expose application data through malicious OpenPGP keys
The GnuPG project has released fixes for a critical memory-management flaw in GPGME, a library used by applications that interact with GnuPG. Tracked as CVE-2026-129975, the issue can be triggered by a malicious OpenPGP key containing an unusually long user ID and could allow data to be exposed from affected applications.
The flaw affects software using GPGME versions earlier than 2.3.1. The project says the vulnerable library may be loaded as a shared library or Windows DLL, or incorporated directly into an application through static linking. As a result, updating a computer’s shared copy alone may not protect programs that bundle their own copy.
How the memory flaw works
The issue is a double-free error: in certain conditions, the same memory is released twice. The affected routines, read_status() and read_colon_line(), process status lines and key listings returned by GnuPG. When they receive sufficiently long input, the routines move data into a larger buffer.
According to the project’s technical description, the routines update the pointer to that buffer only if processing completes without an error. If an error occurs between reallocating the data and updating the pointer, the pointer can still refer to memory that has already been freed. Later cleanup can then attempt to free that memory again.
The project warns that the flaw could be used to steal data from affected applications. It also says remote code execution cannot be ruled out, but does not report known exploitation. The advisory gives signed data sent to an application as an example of a path to the bug; it does not establish which applications process such material without a manual key import.
Applications and components to assess
GPGME is used by a range of software, so organizations should identify both direct dependencies and bundled copies. Examples cited by the project include most mail clients, many XMPP clients, Samba, and its Gpg4win, GnuPG Desktop and GnuPG VS-Desktop packages.
Administrators should not assume that every affected application has the same exposure or update path. The relevant question is whether a product uses a vulnerable GPGME version and, if so, whether that library is managed centrally or included in the application itself. Teams may need to consult application vendors or release notes to confirm which builds contain the fix.
The GnuPG project credited Johan Carlsson with finding the flaw and said it was reported through GitLab. Disclosure had been scheduled for November 25, but the project moved it earlier after the Ruby2Shell issue prompted an earlier update. The advisory does not provide an interim workaround for software that cannot yet be upgraded.
Fixed releases and remediation
GPGME 2.3.1 is the fixed release. Although the vulnerability affects versions before 2.3.0, the project says GPGME 2.3.0 was never publicly available. Users of the shared library or DLL should move to 2.3.1 from the project’s official downloads.
For Windows users, Gpg4win 5.1.2 includes the corrected library. Its release notes classify the issue as severe and advise updating as soon as possible. Organizations using older software that cannot move to GPGME 2.3.1 can review the advisory’s patch or the legacy branch’s fixed release, GPGME 1.24.4. The project cautions that it cannot guarantee every security fix will be available for that legacy branch.
Applications with statically linked or otherwise bundled GPGME require particular attention: updating the operating system’s shared library will not update those embedded copies. Teams should install rebuilt application releases that include the fix when available. The project says GPGMEPP and GPGMEQT do not require an update.
For enterprise response, inventorying GPGME-dependent products and checking their bundled-library versions are practical first steps. Prioritize systems that process OpenPGP keys or signed data from outside the organization, while verifying exposure with product maintainers rather than assuming a particular application follows the example described in the advisory. Because no workaround is provided, remediation depends on deploying a fixed library or an application build that contains one.