GPGME Double Free Makes Public Keys An Application Input Boundary
GPGME CVE-2026-129975 lets a crafted OpenPGP key trigger a double free and leak application data. Update shared and static copies now.
The GnuPG project released GPGME 2.3.1 on November 20 to fix CVE-2026-129975, a double free triggered by an OpenPGP key with a crafted, very long user ID. The maintainers say the flaw can be used to exfiltrate data from applications, for example by sending signed data, and that remote code execution cannot be ruled out. They do not claim that code execution has been demonstrated or that the flaw is being exploited in the wild. The vulnerable code sits in GPGME's handling of GnuPG status lines and key listings, below many application interfaces that treat keys and signatures as routine content.
Operators need to find every copy of the library, not only the `gpg` command. Update current GPGME to 2.3.1, use the fixed legacy 1.24.4 branch where a vendor still carries it, install Gpg4win 5.1.2 on Windows, and accept supported distribution backports where documented. Restart applications that load a shared library and rebuild statically linked binaries, containers and appliances. Teams should also review crashes and anomalous key or signed-message processing, while recognizing that the public advisory provides no campaign indicators and does not establish which application data, if any, left a particular system.
Key Takeaways
- check_circle A crafted OpenPGP key with a very long user ID can reach a double free in GPGME's status-line and key-listing code.
- check_circle GnuPG says application-data exfiltration is possible and remote code execution cannot be ruled out; it does not claim observed exploitation or demonstrated RCE.
- check_circle The practical fixed lines are GPGME 2.3.1 and the legacy 1.24.4 release, with vendor backports possible on supported operating systems.
- check_circle Updating a shared library requires restarting every process that loaded the old code; statically linked applications must be rebuilt and redeployed.
- check_circle Gpg4win users should move to 5.1.2, while package, container, appliance and bundled-application owners need product-specific confirmation.
- check_circle Public keys, signatures and identity strings are attacker-controlled parser inputs even when the cryptographic signature itself is valid.
A Crafted Identity Field Reaches Application Memory
GPGME is the standard library applications use to access GnuPG functions. It sits between programs and engines that encrypt, decrypt, sign, verify and inspect keys. CVE-2026-129975 begins with an OpenPGP key containing a crafted, very long user ID. Processing that key can reach a memory-management error inside GPGME, so the exposure is not limited to a user deliberately importing a suspicious executable. Signed data and normal key-handling workflows can carry the input into an application.
The GnuPG announcement calls the issue critical and says all prior public versions are affected. Its impact section describes software using versions before 2.3.0 through a shared library, Windows DLL or static link; version 2.3.0 was never publicly released. The project names Gpg4win, GnuPG Desktop, GnuPG VS-Desktop, most mail clients, many XMPP clients, Samba and Flatpak as examples. That is an exposure list, not a statement that every version and configuration of every named product is exploitable.
Johan Carlsson reported the issue through GitLab on November 12. The parties initially planned disclosure for November 25, but GnuPG says an unrelated Ruby2Shell update forced GitLab to update earlier, moving the GPGME disclosure to November 20. The shortened coordination window helps explain why downstream package and product advisories may arrive at different times. It does not change the need to use each supplier's supported package path.
The Bug Leaves A Stale Pointer After Buffer Growth
The affected functions read status output and colon-formatted key listings from `gpg`. They begin with a buffer referenced by the GPGME engine context. When more than the initial allocation is needed, the functions use `realloc()` to grow it. A successful reallocation may move the buffer and free the old block. The functions work with the new local pointer but, in the vulnerable code, write it back to the engine context only at the end of a successful call.
Several error and callback paths can return before that write-back. The engine context then retains the old pointer even though its allocation has been freed, while the new allocation is leaked. When the engine is later released, cleanup frees the stale pointer a second time. GnuPG notes that other allocations can happen between those events, so common allocator checks for an immediate double free may not trigger. The failure can therefore corrupt memory after apparently ordinary key or signature processing.
The maintainers say the condition can exfiltrate application data, for example through signed data, and that remote code execution cannot be ruled out. Those are the vendor's risk statements. The public notice does not provide evidence of a working RCE chain, a universal leak primitive or exploitation in the wild. Defenders should not minimize a critical memory-safety bug, but they should report demonstrated data-exposure potential separately from code execution that remains possible rather than proven.
Inventory The Library Below The Visible Application
Start from applications that accept external keys, signed messages, encrypted mail, chat content, repository signatures or automated verification material. Then trace how each reaches GnuPG. Package inventories that contain `gpgme`, `libgpgme`, a GPGME DLL or a bundled copy are stronger evidence than the presence of the `gpg` executable alone. Include desktop clients, servers, background indexers, gateways, CI workers and service integrations that process content without an interactive user.
Shared libraries create a process-level completion problem. Updating a package on disk does not replace code already mapped into a running mail client, XMPP service, file processor or long-lived daemon. Record the package and file version, deployment time, process start time and loaded-library path, then restart or recycle every consumer. Check containers and immutable images separately because a host update does not change the library baked into an image or a still-running container layer.
Static linking moves the fix into the application binary. GnuPG explicitly tells maintainers to rebuild statically linked programs against GPGME 2.3.1. Software bills of materials, build manifests, lock files and link maps can reveal these copies; a runtime package query cannot. Ask appliance and commercial-software vendors for an affected-version statement and fixed build. Do not replace vendor-managed libraries manually when that would break signatures, support or future updates.
Use The Fixed Branch That Matches The Product
The current upstream release is GPGME 2.3.1. GnuPG also published legacy GPGME 1.24.4 with the same double-free fix for consumers that have not moved to the split 2.x libraries, while warning that the legacy branch may not receive every future security patch. Linux and Unix distributors may backport the patch while retaining an older-looking package version. Use the distributor's security notice, changelog and build revision as acceptance evidence rather than rejecting a supported backport solely because the upstream number differs.
Windows users of the GnuPG suite can install Gpg4win 5.1.2, released November 20 with the fixed GPGME DLL. The installer keeps keys and configuration when updating an older version. Organizations using GnuPG Desktop or GnuPG VS-Desktop should follow the corresponding vendor update channel named in the advisory. Inventory portable installations and remote-session hosts as well as centrally managed endpoints, because a second bundled DLL can remain active after the most visible desktop package changes.
The advisory says there is no need to update GPGME++ or the Qt binding solely for this flaw. That does not mean an application using those bindings is safe while its underlying GPGME C library remains vulnerable. Validate the complete dependency path and loaded binary. Where an immediate package update is unavailable, GnuPG provides a source patch intended to apply to older versions, but downstream maintainers should build, test, sign and distribute that change through their normal trusted process.
Triage Key Processing Without Inventing Indicators
The public advisory provides no malicious key fingerprint, sender list, network address or observed campaign. Investigation therefore begins with behavior and exposure. Preserve application crashes, heap and allocator diagnostics, core dumps where policy permits, GPGME and GnuPG errors, mail or messaging gateway events, key-import history and signed-message processing records. Correlate failures with unusually large identity fields, external senders and content that multiple applications handled around the same time.
A crash is not proof that application data was exfiltrated, and a lack of crashes does not prove the vulnerable path was never reached. The stale-pointer sequence can depend on callbacks, errors, allocator behavior and intervening allocations. Scope the process that handled the input: what messages, decrypted content, credentials, address books, files or service tokens were present in that process, and what network destinations it could reach. Use that boundary to prioritize deeper analysis and credential containment.
Handle suspect keys and messages as evidence. Do not repeatedly open them in vulnerable desktop clients to reproduce a failure. Analyze copies in an isolated, patched environment with controlled egress and preserve hashes plus acquisition context. If a gateway or service processed the same material for many users, investigate the shared service before asking every recipient to interact with it. The goal is to understand one parser path without creating new vulnerable executions.
Verification Must Reach Every Consumer And Build
Close the response with a dependency matrix: application owner, host or image, linkage type, supplied GPGME branch, fixed package or product build, restart or rebuild proof, and a functional signing and verification test. Confirm current applications still read expected keys and messages after the update. For mail and chat systems, test both user-facing clients and server-side processors. For CI and repositories, test the automated signature path without importing untrusted material into production.
Keep untrusted identity strings bounded before they reach logs, user interfaces and secondary parsers. The GPGME fix addresses the disclosed memory error, but applications should still place limits on key ingestion, isolate complex parsers, minimize secrets in long-lived processes and separate content processing from privileged actions. Cryptographic validity answers whether a signature matches a key. It does not make the key's metadata, packet structure or presentation fields safe to parse without normal input defenses.
Finally, preserve update provenance. GnuPG publishes signed release artifacts and integrity instructions; operating-system and product vendors provide their own signed packages. Record the source, signature or repository metadata and resulting file identity. A hurried security change that pulls an unverified library from an informal mirror can replace one parser risk with a supply-chain problem. The correct finish is a trusted fix, loaded by every consumer, with static copies rebuilt and the application behavior revalidated.
Checklist
- Inventory shared, DLL, bundled and statically linked GPGME copies across clients, servers, containers, gateways, appliances and CI systems.
- Update current GPGME to 2.3.1, legacy GPGME to 1.24.4, Gpg4win to 5.1.2, or the documented fixed vendor package.
- Restart every process that loaded the old shared library and rebuild every static binary or immutable image against fixed code.
- Verify the loaded library path and product build, then test normal key import, signing, verification, encryption and decryption workflows.
- Preserve crashes, allocator diagnostics, key-processing history and suspect signed content without reopening it in a vulnerable client.
- Scope the data and credentials present in any process that shows evidence of malicious input or memory corruption, and contain accordingly.
- Use signed upstream or vendor packages and retain update provenance, restart proof and dependency ownership in the remediation record.
Sources
- GnuPG security advisory for GPGME CVE-2026-129975 open_in_new
- GnuPG T8557 technical root-cause record open_in_new
- GnuPG official download and fixed-version index open_in_new
- GnuPG legacy GPGME 1.24.4 release record open_in_new
- Gpg4win 5.1.2 security-update download open_in_new
- NVD record for CVE-2026-129975 open_in_new
Continue Reading
Cleverbridge Breach Puts Payment Data Retention In Scope
Cleverbridge says attackers copied stored payment-card data. Affected buyers should contact issuers, replace exposed cards and monitor transactions.
Drupal Installer Exploitation Makes Deployment State A Security Boundary
Drupal CVE-2026-132165 is exploited through install.php. Patch supported branches, block the installer and investigate writable-site changes.
vCenter Zero-Day Turns SSO Trust Into Virtualization Control
vCenter CVE-2026-123890 was exploited to create SSO admins and steal signing keys. Patch every branch, preserve evidence and reset trust.