# CVE-2026-57062: GnuPG gpgsm improper validation of AES-GCM tag length in CMS

Source: https://junglewise.ai/threats/cve-2026-57062-gnupg-gpgsm-improper-validation-of-aes-gcm-tag-length-in-cms  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-23. Updated: 2026-06-23  
License: CC BY 4.0 with a link back

CVE-2026-57062 · Severity: low · CVSS 2.9 · Published 2026-06-23

GnuPG is a widely used suite of tools for encrypting and signing data. A vulnerability in its S/MIME component, gpgsm, allows an attacker to bypass security checks by providing a shorter-than-expected authentication tag. While difficult to exploit, this could theoretically allow an attacker to tamper with encrypted messages without being detected.

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

## Quick answers

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

**How severe is CVE-2026-57062?** Low severity, with a CVSS score of 2.9, published 23 June 2026.

**Which products and versions are affected?** GnuPG through 2.5.20.

**Is there a fix for CVE-2026-57062?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

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

**Am I affected by CVE-2026-57062?** Check whether you run GnuPG 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 vulnerability exists in the CMS parsing logic of gpgsm within GnuPG through version 2.5.20. The component improperly validates the 'aes-ICVlen' parameter in AES-GCM AuthEnvelopedData, trusting the length of the MAC field provided in the ciphertext. While the specification recommends a 12-byte tag, the underlying libgcrypt library permits tags as short as 4 bytes. An attacker can exploit this by providing a truncated tag, reducing the integrity protection to a 32-bit value, which can be brute-forced to forge or modify encrypted messages. This is a local attack with high complexity as it requires the ability to submit numerous forgery attempts to the victim's gpgsm process.

## Affected products

- GnuPG GnuPG through 2.5.20

## Timeline

- 2026-06-23: disclosed: CVE published to NVD

## References

- [https://blog.calif.io/p/how-to-format-a-ciphertext](https://blog.calif.io/p/how-to-format-a-ciphertext)
- [https://www.gnupg.org/download/](https://www.gnupg.org/download/)

## Related threats

- [GnuPG stack overflow in tpm2daemon PKDECRYPT handling](https://junglewise.ai/threats/cve-2026-24882-gnupg-stack-overflow-in-tpm2daemon-pkdecrypt-handling)
- [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)
