CVE-2026-24881

GnuPG: GnuPG: Remote code execution and denial of service via crafted CMS EnvelopedData message

Published Jan 27, 2026 CVSS 3.1 · 8.1 High EPSS 1.8% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A crafted CMS (S/MIME) EnvelopedData message with an oversized wrapped session key can cause a stack‑based buffer overflow in gpg-agent during PKDECRYPT handling with the kem=CMS option. The overflow can lead to of service by crashing the agent, and the associated memory corruption could allow an attacker to execute arbitrary code. This vulnerability is classified as a CWE‑121 stack-based buffer overflow.

Affected Systems

GnuPG versions before 2.5.17, including the gpg4win bundle that incorporates this GnuPG library, are vulnerable. Any system that processes CMS EnvelopedData through gpg-agent without updating to a fixed release is exposed.

Risk and Exploitability

The CVSS score is 8.1, indicating high severity. The EPSS score is 1%, suggesting a low probability of exploitation at this time, and the vulnerability is not listed in the CISA KEV catalog. Nevertheless, the attack vector is likely to involve malicious S/MIME messages sent over email or other transport channels that the victim’s system processes locally. An attacker can simply craft a sending file to trigger the overflow, resulting in a service crash or potential code execution.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade GnuPG to version 2.5.17 or newer, which contains the fix for the CMS buffer overflow.
  • For users of Gpg4win, install the latest Gpg4win package that bundles the updated GnuPG release.
  • If an upgrade cannot be performed immediately, block or quarantine any incoming mails or CMS‑EnvelopedData attachments until the patch is applied.

Generated by OpenCVE AI on June 18, 2026 at 05:30 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Gpg4win
Gpg4win gpg4win
CPEs cpe:2.3:a:gnupg:gnupg:*:*:*:*:-:*:*:*
cpe:2.3:a:gpg4win:gpg4win:*:*:*:*:*:*:*:*
Vendors & Products Gpg4win
Gpg4win gpg4win
Type Values Removed Values Added
Title GnuPG: GnuPG: Remote code execution and denial of service via crafted CMS EnvelopedData message
References
Metrics threat_severity

None

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
First Time appeared Gnupg
Gnupg gnupg
Weaknesses CWE-121
CPEs cpe:2.3:a:gnupg:gnupg:*:*:*:*:*:*:*:*
Vendors & Products Gnupg
Gnupg gnupg
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-121

    Stack-based Buffer Overflow

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Jul 15, 2026, 1:16 AM
Reserved
Jan 27, 2026, 6:36 PM
Status
Modified
Published
Jan 27, 2026, 7:16 PM
Modified
Jul 15, 2026, 2:18 AM
Severity
Important
Public date
Jan 27, 2026, 6:36 PM