Pull to refresh
Logo
GnuPG patches a 24-year-old double free in its GPGME library

GnuPG patches a 24-year-old double free in its GPGME library

New Capabilities

The signature-checking library behind most mail clients can leak application data when it reads a crafted OpenPGP key, and GnuPG will not rule out remote code execution.

Overview

Updated 56 minutes ago

GnuPG released GPGME 2.3.1 on 20 November 2026 to fix a double free that has sat in the library for 24 years. Any program that hands GPGME an OpenPGP key with a crafted, very long user ID can trigger it.

The advisory says the bug can be used to pull data out of applications, and that remote code execution 'can't be ruled out.' Researchers pushed back on that second claim, noting that a double free still needs heap grooming and an address space layout randomization bypass before it becomes anything more, and that no proof-of-concept has been published.

Why it matters

If your mail client or package manager verifies OpenPGP signatures, it probably links GPGME, and bundled copies need their own rebuild.

Questions about this story

Free account needed to ask — your question is kept and asked for you right after sign-up. Answers are public.

No questions yet — be the first to ask.

Key Indicators

24
Years the bug existed
The fix commit describes it as a 24-year-old bug, introduced in an earlier engine change.
8
Days from report to public advisory
GnuPG was told on 12 November and published on 20 November, five days before the planned date.
2.3.1
First fixed GPGME release
Released 19 November 2026. The intermediate 2.3.0 was never publicly available.
1.24.4
Fixed legacy branch release
Deployments that cannot move to 2.3.1 got a patch on the older branch.

Voices

Curated perspectives — historical figures and your fellow readers.

Sign up to generate historical perspectives on this story.

People Involved

Organizations Involved

Timeline

7 events Latest: Today
Tap a bar to jump to that date
  1. Researchers dispute the RCE label

    Today Analysis

    Commenters note a double free needs heap grooming and an ASLR bypass, and that no proof-of-concept exists.

  2. Advisory published five days early

    Advisory

    GnuPG cites GitLab's Ruby2Shell schedule change; Gpg4win 5.1.2 ships the fixed library.

  3. GPGME 2.3.1 released

    Release

    Release notes list the double-free fix alongside new post-quantum key algorithm constants.

  4. Disclosure set for 25 November

    Statement

    Werner Koch says the fix is in GPGME 2.3.1 and the announcement is planned for the 25th.

  5. Fix committed

    Patch

    Commit 14499348 writes the reallocated buffer back to the context immediately, closing a 24-year-old bug.

  6. Report reaches GnuPG

    Disclosure

    GitLab passes GnuPG the double-free report from Johan Carlsson.

Scenarios

1

No public exploit appears and the RCE claim stays unproven

Likely Resolves by May 31, 2027

Discussed by: Hacker News commenters mik1998 and gsich, and the advisory's own hedged wording

GnuPG says only that code execution cannot be ruled out. Turning a double free into code execution means placing a controlled object in the freed memory and defeating address space layout randomization, and the layout differs in every program that links the library. Without a demonstrated exploit, the practical exposure stays at data leakage.

2

A working exploit lands against one specific application

Unlikely Resolves by Nov 20, 2027

Discussed by: Hacker News commenter kuroguro, who notes the outcome depends on the host application's heap

GPGME is a library, so exploitability is decided downstream. A program that passes attacker-supplied keys or signed messages straight into GPGME, and whose heap layout is predictable, could turn the double free into control of execution. The advisory does not say which programs accept such material without a manual key import.

3

Bundled and statically linked copies stay unpatched

Possible Resolves by Q1 2027

Discussed by: The Hacker News write-up, which notes that system library updates do not reach bundled copies

Windows DLL bundles, Flatpak runtimes and programs that compile GPGME into the binary all need their own rebuilds. If those rebuilds lag, the fix reaches only part of the installed base even though the advisory is public and a patch is available.

Historical Context

3 moments from history that rhyme with this story — and how they unfolded.

April 2014

Heartbleed (2014)

A missing bounds check in OpenSSL's heartbeat extension let anyone send a malformed request and read up to 64 kilobytes of a server's memory. OpenSSL sat under a large share of the encrypted web, so one library flaw became thousands of separate incidents.

Then

Administrators patched OpenSSL and replaced certificates and private keys that may have leaked.

Now

It became the reference case for how a bug in a shared library spreads to every product that links it.

Why this matters now

GPGME has the same shape: one fix, and every mail client, package manager and bundled application has to pick it up separately.

September 2014

Shellshock (2014)

A parsing flaw in GNU Bash let an attacker smuggle commands into environment variables, so a web server that passed a request header to a shell could be made to run code. Bash was installed on most Linux and Unix systems.

Then

Patches shipped within days, the rollout was uneven, and scanners swept the internet for unpatched hosts.

Now

It showed how an RCE label drives patching urgency well past what confirmed exploitation would justify.

Why this matters now

The GPGME advisory's refusal to rule out code execution is doing similar work, moving updates faster than a data-leak notice would.

May 2008

Debian OpenSSL entropy bug (2008)

A maintainer's patch to silence a compiler warning removed most of OpenSSL's randomness on Debian, so keys generated on affected systems were predictable. The flaw had been live for roughly two years before it was found.

Then

Debian and Ubuntu revoked the weak keys and told users to regenerate SSH and TLS credentials.

Now

It made the exact build of a library, not just its name, a security question.

Why this matters now

The GPGME bug carries the same distribution problem: statically linked and bundled copies do not receive a system library update.

Sources

(6)