Back

GnuPG releases GPGME 2.3.1 to fix critical double free vulnerability
SiTech AI Team3 min read

GnuPG releases GPGME 2.3.1 to fix critical double free vulnerability

GnuPG released GPGME 2.3.1 to fix a critical double free vulnerability tracked as CVE-2026-129975. The flaw affects software using GPGME before 2.3.0 and may allow data exfiltration.

GnuPG has released GPGME version 2.3.1 to fix a critical security bug present in all prior versions. The vulnerability, tracked as T8557 and CVE-2026-129975, involves a double free that can be triggered by an OpenPGP key with a crafted very long user id. An immediate update is highly suggested because the flaw may allow data exfiltration and remote code execution cannot be ruled out.

What the vulnerability does

By using an OpenPGP key containing a crafted very long user id, it is possible to trigger a double free. This double free can be used to exfiltrate data from applications by sending, for example, signed data. Exploiting the bug to mount a remote code execution attack cannot be ruled out.

Root cause

The root cause is in two GPGME internal functions that read status lines and key listings from gpg. A buffer of 1024 bytes is initially allocated and reallocated when more space is required. When reallocating, the pointer to the new buffer is used by the function but is only assigned back to the context object at the end of the function. If the function returns early due to a read error or other events, the context is not updated and keeps a stale pointer to freed memory. Eventually the context is released and the memory is freed a second time, and other allocations in between may prevent common double free checks from triggering.

Affected software and update guidance

All software using a GPGME version prior to 2.3.0, whether as a shared library, DLL, or statically linked, is affected. Examples include Gpg4win, GnuPG Desktop, GnuPG VS-Desktop, most mail clients, many XMPP clients, Samba, and Flatpack. Users should update the GPGME shared library to version 2.3.1. If a DLL is needed, it may be taken from the updated Gpg4win version, and statically linked binaries should be rebuilt against GPGME 2.3.1. If GPGME cannot be updated, the attached patch may be applied; there is no need to update GPGMEPP or GPGMEQT.

Release details

GPGME 2.3.1 was released on 2026-11-19 and follows version 2.2.0; version 2.3.0 was never publicly available. The release adds new constants GPGME_PK_MLKEM, GPGME_PK_MLDSA, and GPGME_PK_DLTHM, with mappings for algorithms used by backends. The vulnerability was discovered by Johan Carlsson, and GitLab informed GnuPG on 2026-11-12. Coordinated disclosure was initially planned for 2026-11-25, but disclosure occurred on 2026-11-20 after GitLab updated earlier due to the Ruby2Shell bug. The source code is available as gpgme-2.3.1.tar.bz2, with checksum 1134a407b50204ee6fb9efaa6e1451c2460e543e. A new Gpg4win version, 5.1.2, includes the fixed GPGME along with the Kleopatra GUI and a PDF reader. Debian style packages are also provided for several Debian variants.

Sources: lists.gnupg.org

SiTech

SiTech — AI-powered web development

We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.