GPGME's CVE-2026-129975 Double Free Needs Only a Crafted Key, and 2.3.1 Is the Fix
Security / news
GPGME's CVE-2026-129975 Double Free Needs Only a Crafted Key, and 2.3.1 Is the Fix
GnuPG disclosed five days early because GitLab had to update, and no CVSS score exists yet to rank it.
An attacker who can get a crafted OpenPGP key with a very long user ID in front of an application that links GPGME can trigger a double free in the library (CVE-2026-129975), and GnuPG says data exfiltration is possible and remote code execution "can't be ruled out". The fix is GPGME 2.3.1, and the legacy 1.x branch has its own fixed release, 1.24.4. The application has to process attacker-influenced key data, which is routine for mail clients.
GnuPG posted the advisory (internal ID T8557) on November 20, 2026, five days ahead of its planned November 25 date. The advisory says it moved the date because GitLab had to update early, following the separate Ruby bug known as "Ruby2Shell".
The timeline: November 12 to November 21
| Date (2026) | Event |
|---|---|
| November 12 | GitLab informs GnuPG; the advisory credits Johan Carlsson as reporter |
| November 19 | GPGME 2.3.1 released (2.3.0 was never public) |
| November 20 | Advisory posted, five days before the planned November 25 date |
| November 21 | Ostorlab reports no CVSS score, no CVE record in the public database, no known exploitation |
The advisory does not say how GitLab came to know of the flaw, and it gives no CVSS score. Ostorlab, a security vendor that wrote the bug up on November 21, found none either, and said the CVE was not in CISA's Known Exploited Vulnerabilities catalogue that day. It also reported no public proof-of-concept code.
What the flaw is and what it needs
Two functions in src/engine-gpg.c, read_status() and read_colon_line(), read status lines and key listings from gpg. Each starts with a 1,024-byte buffer and reallocates when a line is longer. The new pointer is written back to the context only at the end of the function, so an early return (a read error, for example) leaves the context holding a pointer to memory that has already been freed. When the context is released, that memory is freed a second time.
The trigger is therefore a user ID long enough to force a reallocation, plus a read failure on the way out. The attacker does not need the victim's signature. The application does have to parse attacker-influenced OpenPGP data, according to Ostorlab, and programs that never touch untrusted keys do not reach the path.
The advisory lists Gpg4win, GnuPG Desktop, GnuPG VS-Desktop, "most mail clients", many XMPP clients, Samba and Flatpak as software that ships GPGME.
Which versions are fixed
The advisory says every GPGME release before 2.3.0 is affected, and 2.3.0 was never released, so 2.3.1 is the first fixed build on the 2.x line. Ostorlab breaks the ranges out: 2.0.0 through 2.2.0 are affected on the 2.x branch, and 1.0.0 through 1.24.3 on the legacy branch.
Debian's tracker shows how that lands in distributions. It records the bug as introduced in the gpgme-0-3-9 commit and fixed in gpgme-2.3.0, a version number that never shipped, which is a quirk of the tracker rather than a second release.
| Debian release | Vulnerable build | Fixed build |
|---|---|---|
| bookworm | 1.18.0-3 | 1.18.0-3+deb12u1 (DLA-4924-1) |
| trixie | 1.24.2-3 | 1.24.2-3+deb13u1 (DSA-6646-1) |
| forky | 2.2.0-2 | not yet fixed in the tracker |
| sid | n/a | 2.3.1-1 |
What to do
Update the shared library to 2.3.1, or to 1.24.4 on the legacy branch, and restart anything that has it loaded. Windows users can take the DLL from Gpg4win 5.1.2. Statically linked programs carry their own copy and must be rebuilt against the fixed library. GnuPG attached a patch that it says should apply cleanly to very old versions, and the bindings GPGMEPP and GPGMEQT need no update of their own.
There is no workaround that avoids the bug, and Ostorlab says configuration changes do not remove it. There is no score to overstate or understate yet. Until the CVE record carries a CVSS vector, scanners that sort by severity will not rank this one, so patch from the advisory rather than from the dashboard. Two other library flaws this month show how that plays out: Ghostscript's Upload2Shell bug and REDCap's CVE-2026-90817, which CISA listed 59 days after the CVE.
Sources
More in Security
- 01Dragos Seeded 2 Million Prompts With Canaries; Amazon's Decoys Caught ARTEX Agents Grading Stolen AI KeysTwo reports from November 13 and 19 show AI credentials being harvested and spent by machines, and a Chinese lab fetching secrets from ZDR prompts.
- 02REDCap's CVE-2026-90817 Needs Only a Public Survey Hash, and CISA Listed It 59 Days After the CVEVanderbilt's survey platform is fixed in 16.0.49 LTS, 17.3.10 LTS and 17.4.4, and Safe Security reports a miner installed with cron persistence and an SSH key.
- 03LiteLLM's CVE-2026-40217 Is on CISA's KEV List, but Advisory and Google Name Different EndpointsGitLab's advisory says the bug needs a proxy-admin credential, while Google's report says attackers used it to turn standard virtual keys into admin ones.
- 04Ghostscript's Upload2Shell Flaw, CVE-2026-125396, Escapes -dSAFER and Is Fixed in 10.08.0The flaw is scored 7.8 to 8.5 as a local bug, yet researchers confirmed command execution through CUPS print queues, Roundcube message view and WordPress uploads.