Skip to content

A crafted OpenPGP key can double-free GPGME, the library behind GnuPG

CVE-2026-129975 affects every GPGME build before 2.3.1, the library Flatpak, Samba and mail clients like Thunderbird use to talk to GnuPG.

Source: GnuPG

GnuPG has patched a critical double-free bug in GPGME, the library most programs use to talk to GnuPG rather than shelling out to it directly. An OpenPGP key with a crafted user ID longer than 1,024 bytes triggers it: two internal functions resize a buffer but only save the new pointer if they finish without error, so an early return leaves a dangling pointer that gets freed twice.

GnuPG credits Johan Carlsson with the find, reported via GitLab on 12 November. The fix landed in GPGME 2.3.1 on 19 November, with a backport to the 1.24 branch the same week. GPGME sits underneath Flatpak’s signature verification, Samba, and mail clients including Thunderbird, KMail and Evolution, so the bug reaches further than GnuPG’s own user base.

Why it matters: if your software links GPGME, directly or through a dependency, a malicious key file or keyserver response is enough to trigger this before any signature is checked. GnuPG says remote code execution can’t be ruled out, on top of the confirmed risk of leaking data from the process that parsed the key.

The caveat: GnuPG hasn’t confirmed exploitation in the wild, and coordinated disclosure was due 25 November before an unrelated bug forced an early release, so distributions are still catching up on packaging the fix.

Share

Related reading

More from The Wire

All briefs