CVE-2026-24881

8.1 HIGH

📋 TL;DR

This vulnerability in GnuPG allows attackers to trigger a stack-based buffer overflow by sending specially crafted CMS/S-MIME messages with oversized wrapped session keys. This can lead to denial of service or potentially remote code execution. Systems running vulnerable versions of GnuPG that process CMS/S-MIME messages are affected.

💻 Affected Systems

Products:
  • GnuPG (gpg-agent)
Versions: All versions before 2.5.17
Operating Systems: Linux, Unix-like systems, Windows, macOS
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using CMS/S-MIME message processing via gpg-agent's PKDECRYPT--kem=CMS functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the gpg-agent process, potentially leading to full system compromise.

🟠

Likely Case

Denial of service through gpg-agent crashes, disrupting encryption/decryption operations.

🟢

If Mitigated

Limited impact if systems don't process untrusted CMS/S-MIME messages or have network filtering in place.

🌐 Internet-Facing: MEDIUM - Requires processing of crafted CMS messages, which typically come from email or network services.
🏢 Internal Only: LOW - Internal systems are less likely to receive malicious CMS messages unless targeted.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires sending crafted CMS messages to trigger the buffer overflow. No public exploit code is currently available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.5.17

Vendor Advisory: https://dev.gnupg.org/T8044

Restart Required: Yes

Instructions:

1. Download GnuPG 2.5.17 or later from https://gnupg.org/download. 2. Stop gpg-agent processes. 3. Install the updated version. 4. Restart gpg-agent and related services.

🔧 Temporary Workarounds

Disable CMS/S-MIME processing

all

Configure gpg-agent to reject CMS/S-MIME messages if not required

gpgconf --kill gpg-agent
Add 'disable-cms' to gpg-agent.conf

Network filtering

all

Block or filter incoming CMS/S-MIME messages at network boundaries

🧯 If You Can't Patch

  • Implement strict input validation for CMS/S-MIME messages
  • Monitor gpg-agent processes for crashes and restart automatically

🔍 How to Verify

Check if Vulnerable:

Check GnuPG version with 'gpg --version' and verify it's below 2.5.17

Check Version:

gpg --version | head -1

Verify Fix Applied:

Confirm version is 2.5.17 or higher with 'gpg --version'

📡 Detection & Monitoring

Log Indicators:

  • gpg-agent crash logs
  • segmentation fault errors in system logs
  • unexpected gpg-agent restarts

Network Indicators:

  • Unusually large CMS/S-MIME messages
  • Multiple failed decryption attempts

SIEM Query:

process:gpg-agent AND (event_id:1000 OR signal:SIGSEGV)

🔗 References

📤 Share & Export