CVE-2026-24881
📋 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
- GnuPG (gpg-agent)
📦 What is this software?
Gnupg by Gnupg
Gpg4win by Gpg4win
⚠️ 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.
🎯 Exploit Status
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
allConfigure gpg-agent to reject CMS/S-MIME messages if not required
gpgconf --kill gpg-agent
Add 'disable-cms' to gpg-agent.conf
Network filtering
allBlock 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)