Skip to content
feed: live
0dayNews
threat intel

GPGME 2.3.1 fixes a critical double free in key parsing

GnuPG warns that GPGME before 2.3.1 can hit a critical double free on a long OpenPGP user ID. No attacks reported. Here is what to update and why bundled copies matter.

GPGME 2.3.1 fixes a critical double free in key parsing
Image: AI-generated — conceptual illustration, not incident evidence / 0dayNews AI Cover · Generated on-site infrastructure — no external license
fuseMarisol "Fuse" Delgado·Published ·2 min read

Patch status: fixed. Exploitation: none reported. Priority: update the library, then chase down the apps that carry their own copy.

The GnuPG project warned on Friday that a critical memory bug in GPGME, the library programs use to talk to GnuPG, can be triggered by a malicious OpenPGP key with an unusually long user ID. The Hacker News reports that the project says the flaw could be used to steal data from affected applications and that remote code execution cannot be ruled out. The project has not reported any attacks exploiting it.

What is affected

Everything that uses GPGME before version 2.3.0 is affected, whether the library is loaded as a shared library, a Windows DLL, or built statically into the program. The project’s examples include most mail clients, many XMPP clients, Samba, and its own Gpg4win, GnuPG Desktop, and GnuPG VS-Desktop packages.

The bug is a double free, meaning the same memory is released twice. It sits in two routines that read status lines and key listings coming back from GnuPG. When input runs long, they move the data to a larger buffer but only record the new address if they finish without errors. An error in between leaves a pointer to memory that was already freed, and cleanup then frees it again.

The advisory’s example path is signed data sent to an application. Which programs pass such material to the library without a manual key import is not something the advisory spells out, so do not assume your mail client is safe because you never import keys by hand.

What to update

  • Shared library or DLL: move to GPGME 2.3.1. A version 2.3.0 was never publicly available.
  • Windows: Gpg4win 5.1.2 bundles the fixed library. Its release notes call the issue severe and say to update as soon as possible.
  • Older versions that cannot move to 2.3.1: the advisory carries a patch, and the legacy branch has its own fixed release, 1.24.4. The legacy notes say the project cannot guarantee that branch will see every security patch.
  • Bundled and statically linked copies: updating the system library does not reach these. The applications containing them need their own rebuilt releases.
  • GPGMEPP and GPGMEQT: no update needed.

The advisory offers no interim workaround for software that cannot update yet.

Priority call

Update the system library today, since that covers most Linux mail clients in one move. Then inventory anything that ships its own GPGME: Windows desktop bundles, appliances, and Samba builds. Those are the ones that will sit unpatched because nobody owns them. Until they are rebuilt, treat keys from untrusted sources as hostile input to those apps.

The flaw was found by Johan Carlsson and reported to the project by GitLab last week. Disclosure was planned for November 25 and moved up after GitLab had to update early because of the Ruby2Shell bug.

Related coverage: CISA KEV adds four flaws, patch order for the Nov 23 deadline.

Found this useful? Share it.