CVE-2026-24881 Memory corruption in GnuPG

High 8.1 Published Updated

A crafted S/MIME message triggers a stack buffer overflow in gpg-agent, allowing attackers to cause denial of service or potentially execute arbitrary code.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-24881?

CVE-2026-24881 is a high-severity memory corruption vulnerability in GnuPG, published on 27 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In GnuPG before 2.5.17, a crafted CMS (S/MIME) EnvelopedData message carrying an oversized wrapped session key can cause a stack-based buffer overflow in gpg-agent during PKDECRYPT--kem=CMS handling. This can easily be leveraged for denial of service; however, there is also memory corruption that could lead to remote code execution.

Weakness: CWE-121

Which versions are affected by CVE-2026-24881?

It affects 2 products.

Products include Gnupg Gnupg, Gpg4win Gpg4win.

How do I fix CVE-2026-24881?

Upgrade to a fixed version.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-24881 being exploited?

There is no known exploitation of CVE-2026-24881 in the wild and no public exploit code.

Sources

Also known as GHSA-5w36-x85h-pphm, JLSEC-2026-564.

Is CVE-2026-24881 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free