Critical GPGME Flaw in GnuPG Library Lets Malicious OpenPGP Keys Expose Application Data

The GnuPG project has disclosed a critical memory-safety vulnerability in GPGME, the library that countless applications rely on to interact with GnuPG for encryption, signing, and key management. According to an advisory published by the project, a specially crafted OpenPGP key can trigger the flaw and potentially leak sensitive data held by affected applications. Fixed versions have already been released, and anyone building on GPGME is urged to upgrade without delay.

What Is GPGME?

GPGME (GnuPG Made Easy) is the standard interface that software uses to talk to GnuPG. Rather than shelling out to the gpg binary and parsing its output, developers link against GPGME to perform cryptographic operations programmatically. Because of that role, it sits inside mail clients, package managers, password managers, backup tools, and other software that processes keys or encrypted messages. A bug in GPGME therefore has a wide blast radius: it affects not GnuPG itself, but the long list of downstream programs that depend on the library.

The Vulnerability: CVE-2026-129975

The issue, tracked as CVE-2026-129975, is a memory bug triggered when GPGME parses an OpenPGP key that carries an unusually long user ID. User IDs are the human-readable labels attached to a key—typically a name and email address—and the OpenPGP format allows them to be arbitrarily long. According to the GnuPG project's warning, a malicious key containing an oversized user ID can provoke the bug during processing, with the potential to expose data from the application that handled the key.

The project rates the flaw as critical. The core concern is that an attacker who can get a victim's software to import or inspect a crafted key could reach beyond the key itself and access data the application was holding. The exact exploitation mechanics were not detailed in the advisory, but the class of bug—memory corruption during parsing of attacker-supplied input—is a familiar and serious one, since it can lead to crashes, information disclosure, or worse depending on how the affected program is built.

Who Is Affected

All software that uses GPGME before version 2.3.0 is affected, according to the advisory. That version cutoff is the key detail for defenders: the fix landed in 2.3.0, so any application shipping or linking an older GPGME release remains exposed until it is rebuilt against a patched version. Because many applications bundle their own copies of GPGME, patching the system library alone may not be sufficient—each affected program needs to be updated to a build that includes the fix.

Attack Surface and Practical Risk

What makes this bug notable is how little the attacker needs. Crafting an OpenPGP key is trivial with standard tooling, and keys circulate constantly through keyservers, email signatures, package signing infrastructure, and direct exchange between users. An attacker does not need to break any cryptography; they only need to get a malicious key in front of software that parses it with a vulnerable GPGME build. That could happen through a keyserver lookup, an imported contact, a signed message, or a supply-chain step that verifies signatures.

The realistic risk depends heavily on the surrounding application. A tool that processes untrusted keys automatically—say, a mail client that fetches keys for signature verification—offers a more direct path than one that only handles keys a user explicitly imports. Regardless, the exposure of application data, as the advisory warns, elevates this from a simple denial-of-service nuisance to a genuine confidentiality concern.

Remediation Guidance

  • Upgrade GPGME to version 2.3.0 or later. This is the primary fix. Confirm the version actually linked by your application, not just the one installed system-wide.
  • Update downstream software. If you maintain or deploy applications that bundle GPGME, rebuild and ship them against the patched library.
  • Audit key ingestion paths. Review where your software accepts OpenPGP keys from untrusted sources and consider limiting automatic import or verification of keys from untrusted channels.
  • Monitor for vendor advisories. Distributions and application vendors will issue their own updates; track those for the software in your environment.
  • Treat keys as untrusted input. As with any parser, keys arriving from outside your trust boundary should be validated and handled defensively.

The Bigger Picture

This disclosure is a reminder that the cryptographic ecosystem's weakest points are often not the ciphers but the parsers and libraries around them. GPGME exists to make strong cryptography easy to integrate—and that convenience means a single memory-safety defect can ripple across a large population of applications. Organizations that depend on OpenPGP for signing, verification, or encrypted communication should treat this advisory as urgent, verify their GPGME versions, and prioritize patching any software that processes keys from external sources.

The original report is available at The Hacker News.