# CVE-2026-24882: GnuPG stack overflow in tpm2daemon PKDECRYPT handling

Source: https://junglewise.ai/threats/cve-2026-24882-gnupg-stack-overflow-in-tpm2daemon-pkdecrypt-handling  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-01-27. Updated: 2026-06-30  
License: CC BY 4.0 with a link back

CVE-2026-24882 · Severity: high · CVSS 8.4 · Published 2026-01-27

GnuPG is a widely used tool for encrypting data and managing digital signatures. A security flaw in its TPM (Trusted Platform Module) helper component allows a local attacker to cause a system crash or potentially take control of the software. This could lead to the exposure of sensitive cryptographic keys or unauthorized access to encrypted data on systems using TPM-backed security.

Technologies: [GnuPG](https://junglewise.ai/threats/technologies/gnupg). Vendors: [GnuPG](https://junglewise.ai/threats/vendors/gnupg).

## Quick answers

**Is CVE-2026-24882 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-24882 being exploited in the wild.

**How severe is CVE-2026-24882?** High severity, with a CVSS score of 8.4, published 27 January 2026.

**Which products and versions are affected?** GnuPG 2.5.13 to 2.5.16; Gpg4win 5.0.0.

**Is there a fix for CVE-2026-24882?** A patch was published on 2026-01-27: GnuPG 2.5.17 released with fix Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-24882 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-24882?** Check whether you run GnuPG or Gpg4win at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A stack-based buffer overflow exists in GnuPG's tpm2daemon component within the cmd_pkdecrypt function. The vulnerability is caused by a lack of length validation when copying attacker-supplied ciphertext into fixed-size TPM work buffers (tpm2_rsa_decrypt and tpm2_ecc_decrypt). A local attacker with access to the daemon's Assuan socket can send an oversized ciphertext payload (up to 4096 bytes) to trigger the overflow. This occurs before PIN prompts or TPM operations, potentially allowing for arbitrary code execution with the privileges of the tpm2daemon process. The issue is fixed in GnuPG 2.5.17 and Gpg4win 5.0.1.

## Affected products

- GnuPG GnuPG 2.5.13 to 2.5.16
- Gpg4win Gpg4win 5.0.0

## Timeline

- 2025-12-30: other: Vulnerable version 2.5.16 released
- 2026-01-18: disclosed: Vulnerability reported to vendor by OpenAI Security Research
- 2026-01-27: patched: GnuPG 2.5.17 released with fix
- 2026-01-27: advisory: Public disclosure and CVE assignment

## References

- [https://dev.gnupg.org/T8045](https://dev.gnupg.org/T8045)
- [https://www.openwall.com/lists/oss-security/2026/01/27/8](https://www.openwall.com/lists/oss-security/2026/01/27/8)
- [https://access.redhat.com/errata/RHSA-2026:2719](https://access.redhat.com/errata/RHSA-2026:2719)
- [https://access.redhat.com/errata/RHSA-2026:2753](https://access.redhat.com/errata/RHSA-2026:2753)
- [https://access.redhat.com/security/cve/CVE-2026-24882](https://access.redhat.com/security/cve/CVE-2026-24882)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2433464](https://bugzilla.redhat.com/show_bug.cgi?id=2433464)
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-24882.json](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-24882.json)

## Related threats

- [GnuPG gpgsm improper validation of AES-GCM tag length in CMS](https://junglewise.ai/threats/cve-2026-57062-gnupg-gpgsm-improper-validation-of-aes-gcm-tag-length-in-cms)
- [GnuPG stack buffer overflow in gpg-agent S/MIME handling](https://junglewise.ai/threats/cve-2026-24881-gnupg-stack-buffer-overflow-in-gpg-agent-s-mime-handling)
- [In GnuPG before 2.4.9, armor_filter in g10/armor.c has two increments of an index variable where one is intended…](https://junglewise.ai/threats/cve-2025-68973-in-gnupg-before-2-4-9-armor-filter-in-g10-armor-c-has-two)
- [In GnuPG through 2.4.8, if a signed message has \f at the end of a plaintext line, an adversary can construct a…](https://junglewise.ai/threats/cve-2025-68972-in-gnupg-through-2-4-8-if-a-signed-message-has-f-at-the-end-of-a)
