Back to Intelligence

CVE-2026-129975: Critical GPGME Memory Flaw Exposes App Data via Malicious OpenPGP Keys — Detection and Patching Guide

SA
Security Arsenal Team
November 21, 2026
9 min read

The GnuPG project has disclosed CVE-2026-129975, a critical memory-corruption vulnerability in GPGME (GnuPG Made Easy) — the standard C library that virtually every application on Linux and Unix systems uses to integrate GnuPG encryption, signing, and key management. The bug is triggered when GPGME parses a malicious OpenPGP key containing an abnormally long user ID, and the GnuPG project warns it can be leveraged to steal data from affected applications. Fixed releases are available: GPGME 2.3.0 and later are not affected.

This is a defender's nightmare scenario for one simple reason: GPGME is everywhere and nobody inventories it. Email clients, password managers, file encryption tools, backup utilities, mail server tooling, and CI/CD signing pipelines link against GPGME — often transitively, often as a system package that has been silently present for years. Any of those applications becomes an attack surface the moment it processes an attacker-controlled OpenPGP key. Keys arrive via keyservers, email attachments, signed software repositories, git commits, and WKD (Web Key Directory) lookups. In other words: the delivery vectors are the routine, everyday workflows your organization depends on.

Treat this with the urgency of a critical, remotely triggerable library flaw. Inventory first, patch second, hunt third.

Technical Analysis

What is affected

  • Component: GPGME (GnuPG Made Easy) library, all versions prior to 2.3.0
  • CVE: CVE-2026-129975
  • Trigger: Parsing an OpenPGP key whose user ID packet is unusually long
  • Impact: Memory corruption that can be used to expose/steal data from the host application processing the key
  • Affected surface: Any software that links GPGME — this includes GUI email clients and key managers (e.g., Kleopatra/Gpg4win on Windows), MUA backends (mutt/neomutt with the GPGME backend), password-store tooling, mail server components, package/repository signature verification tooling, and custom in-house applications that call gpgme_op_import, gpgme_op_verify, or key-listing functions
  • Platforms: Primarily Linux/Unix distributions shipping GPGME as a system library, but Gpg4win and other Windows ports that bundle GPGME are equally in scope

How the attack works (defender's view)

The flaw is a memory bug in GPGME's handling of user ID packets during key parsing. The attack chain from a defensive standpoint:

  1. Delivery: The attacker places a crafted OpenPGP public key — containing an oversized user ID — somewhere the victim application will ingest it. Realistic vectors include:
    • A malicious key uploaded to a public keyserver (keys.openpgp.org, SKS-style pools) that the victim fetches
    • An attached key in a phishing email (.asc attachment, or inline armored key) opened in a GPGME-backed mail client
    • A poisoned key served via WKD when a user encrypts to an attacker-influenced address
    • A crafted key embedded in a signed software package, git commit signature, or release artifact processed by automated verification pipelines
  2. Trigger: The application calls a GPGME key-import or key-listing function. Parsing the malformed user ID corrupts memory inside the GPGME context — within the calling application's process space.
  3. Impact: Because GPGME runs in-process, memory corruption can expose data the host application holds — decrypted message content, session keys, passphrases cached in memory, or other sensitive buffers. This is a data-theft primitive against the application itself, not merely a crash.

The critical architectural point: exploitation does not require the attacker to compromise gpg itself or gain code execution on the box first. Any workflow that causes a vulnerable application to look at an attacker-controlled key is sufficient. Automated pipelines that import keys from external sources (mail gateways doing S/MIME/OpenPGP gatewaying, CI systems verifying third-party signatures, monitoring tools refreshing keyrings) are high-value, often unattended targets.

Exploitation status

  • Vendor confirmation: The GnuPG project has publicly warned that the flaw could be used to steal data from affected applications and has shipped fixed versions — vendor language of this severity from the GnuPG project is rare and should be taken seriously.
  • In-the-wild exploitation: No confirmed active exploitation has been reported at the time of writing, and no public CISA KEV entry has been noted yet.
  • Assessment: OpenPGP key parsing is a historically productive bug class (memory-unsafe parsing of attacker-controlled, network-deliverable data). Once the patch diff is public, the vulnerable code path is trivially identifiable, so assume working exploits will follow quickly. Treat the window between disclosure and your patch deployment as the risk window.

Detection & Response

Catching exploitation of a library-level parsing bug is genuinely hard — there is no neat command line to alert on. The highest-fidelity detection strategy is threefold: (1) watch for crashes and abnormal behavior in GPGME-linked processes, since weaponized memory-corruption attempts frequently fault before they succeed (and failed attempts are noisy); (2) hunt for anomalous key-import activity, especially imports of keys with oversized user IDs; (3) use software inventory as a detection layer — any host still running GPGME < 2.3.0 is itself a finding.

Sigma Rules

YAML
---
title: Crash of GPGME-Dependent Process Indicating Possible CVE-2026-129975 Exploitation Attempt
id: 3f9c2a71-8b4e-4d1a-9c65-2e7f5a1b0d93
status: experimental
description: Detects segfaults or abnormal termination of processes known to link GPGME. Weaponized memory-corruption attempts against the GPGME user ID parsing path frequently crash the host application before successful exploitation, making repeated crashes of mail/encryption tooling a high-signal indicator.
references:
  - https://thehackernews.com/2026/11/gnupg-warns-critical-gpgme-flaw-could.html
  - https://attack.mitre.org/techniques/T1203/
author: Security Arsenal
date: 2026/11/06
tags:
  - attack.execution
  - attack.t1203
logsource:
  product: linux
  service: kernel
detection:
  selection:
    Message|contains:
      - 'segfault'
      - 'general protection fault'
  selection_target:
    Message|contains:
      - 'gpg'
      - 'gpgme'
      - 'kleopatra'
      - 'mutt'
      - 'neomutt'
      - 'thunderbird'
      - 'evolution'
      - 'pass'
  condition: selection and selection_target
falsepositives:
  - Genuine software instability in mail clients; investigate when crashes correlate with new key imports or inbound mail
level: high
---
title: OpenPGP Key Import or Refresh from External Source Followed by Application Crash
id: 8e1d4b62-5c3a-4f79-b821-6d0a9e2c4f15
status: experimental
description: Detects gpg/gpgme key retrieval operations (keyserver fetch, WKD lookup, key import from file) closely associated with a child process crash. A crafted key with an oversized user ID delivered via keyserver, WKD, or .asc attachment is the primary CVE-2026-129975 delivery vector.
references:
  - https://thehackernews.com/2026/11/gnupg-warns-critical-gpgme-flaw-could.html
  - https://attack.mitre.org/techniques/T1108/
author: Security Arsenal
date: 2026/11/06
tags:
  - attack.command_and_control
  - attack.t1108
logsource:
  category: process_creation
  product: linux
detection:
  selection_gpg:
    Image|endswith:
      - '/gpg'
      - '/gpg2'
      - '/gpgv'
    CommandLine|contains:
      - '--recv-keys'
      - '--refresh-keys'
      - '--auto-key-retrieve'
      - '--auto-key-locate'
      - '--search-keys'
      - '--import'
  selection_keyserver_url:
    CommandLine|contains:
      - 'hkps://'
      - 'hkp://'
      - 'keyserver'
  condition: selection_gpg or selection_keyserver_url
falsepositives:
  - Routine package-manager key imports and developer keyring refreshes; tune by source and correlate with crash telemetry
level: medium

KQL (Microsoft Sentinel / Defender)

This hunt assumes Linux syslog (and optionally auditd) is ingested into Sentinel via the Syslog/CEF connector — standard practice for mixed environments. It surfaces crash events in GPGME-linked processes and key-import executions, then lets you correlate them by host and time window.

KQL — Microsoft Sentinel / Defender
// Hunt: GPGME-linked process crashes and OpenPGP key import activity (CVE-2026-129975)
let GpgmeProcs = dynamic(["gpg", "gpg2", "gpgme", "kleopatra", "mutt", "neomutt", "thunderbird", "evolution", "pass"]);
let Crashes =
    Syslog
    | where TimeGenerated > ago(14d)
    | where SyslogMessage has_any ("segfault", "general protection fault")
    | where SyslogMessage has_any (GpgmeProcs)
    | project CrashTime=TimeGenerated, Computer, SyslogMessage;
let KeyImports =
    Syslog
    | where TimeGenerated > ago(14d)
    | where ProcessName in~ ("gpg", "gpg2")
    | where SyslogMessage has_any ("--recv-keys", "--refresh-keys", "--auto-key-retrieve", "--auto-key-locate", "--search-keys", "--import")
    | project ImportTime=TimeGenerated, Computer, SyslogMessage;
// Correlate crashes with key imports on the same host within 10 minutes
Crashes
| join kind=inner KeyImports on Computer
| where abs(datetime_diff('minute', CrashTime, ImportTime)) <= 10
| project Computer, CrashTime, ImportTime, CrashMsg=SyslogMessage, ImportMsg=SyslogMessage1
| sort by CrashTime desc
KQL — Microsoft Sentinel / Defender
// Inventory hunt: hosts still running vulnerable GPGME versions (via package-query script output or auditd execve of version check)
// If you deploy the remediation script below with logging to syslog (logger -t gpgme-audit), hunt non-compliant hosts:
Syslog
| where TimeGenerated > ago(7d)
| where ProcessName == "gpgme-audit"
| where SyslogMessage has "VULNERABLE"
| summarize arg_max(TimeGenerated, *) by Computer
| project Computer, TimeGenerated, SyslogMessage
| sort by Computer asc

Velociraptor VQL

This artifact identifies GPGME-linked processes currently running and checks the installed GPGME library version on each endpoint — turning your IR platform into a live exposure assessment.

VQL — Velociraptor
-- CVE-2026-129975: Identify GPGME-linked processes and installed GPGME version
-- Scope: Linux endpoints

LET gpgme_procs = SELECT Pid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE Name =~ '^(gpg|gpg2|gpgme|kleopatra|mutt|neomutt|thunderbird|evolution|pass)$'
   OR CommandLine =~ '(gpgme|--recv-keys|--refresh-keys|--auto-key-retrieve|keyserver)'

LET lib_version = SELECT FullPath AS LibraryPath,
       read_file(filename=FullPath, length=0) AS _touch
FROM glob(globs=[
  '/usr/lib*/libgpgme.so*',
  '/usr/lib/*/libgpgme.so*',
  '/usr/local/lib/libgpgme.so*',
  '/lib/*/libgpgme.so*'
])

SELECT 'running_process' AS Finding, Name, Pid, CommandLine, Exe, Username, CreateTime, NULL AS LibraryPath
FROM gpgme_procs
UNION ALL
SELECT 'gpgme_library' AS Finding, NULL AS Name, NULL AS Pid, NULL AS CommandLine,
       NULL AS Exe, NULL AS Username, NULL AS CreateTime, LibraryPath
FROM lib_version

Remediation Script (Bash)

Deploy via Ansible, Salt, or your configuration management platform. The script reports installed GPGME version, flags vulnerable hosts, checks common distros for the fixed package, and — where the package manager already carries 2.3.0+ — applies the update. It logs to syslog under the gpgme-audit tag so the KQL inventory query above lights up.

Bash / Shell
#!/usr/bin/env bash
# CVE-2026-129975 - GPGME remediation/verification script
# Run as root. Logs results to syslog (tag: gpgme-audit).

set -u
log() { logger -t gpgme-audit "$1"; echo "$1"; }

# --- 1. Determine installed GPGME version ---
ver=""
if command -v gpgme-config >/dev/null 2>&1; then
  ver=$(gpgme-config --version 2>/dev/null)
fi
if [ -z "$ver" ] && command -v dpkg-query >/dev/null 2>&1; then
  ver=$(dpkg-query -W -f='${Version}' libgpgme11 2>/dev/null | cut -d- -f1)
fi
if [ -z "$ver" ] && command -v rpm >/dev/null 2>&1; then
  ver=$(rpm -q --queryformat '%{VERSION}' gpgme 2>/dev/null)
fi

if [ -z "$ver" ]; then
  log "INFO: GPGME not detected on $(hostname) - verify manually"
  exit 0
fi

log "INFO: Detected GPGME version $ver on $(hostname)"

# --- 2. Version check: vulnerable if < 2.3.0 ---
is_vulnerable() {
  [ "$1" = "$(printf '%s\n2.3.0' "$1" | sort -V | head -n1)" ] && [ "$1" != "2.3.0" ]
}

if ! is_vulnerable "$ver"; then
  log "OK: GPGME $ver on $(hostname) is patched (>= 2.3.0)"
  exit 0
fi

log "VULNERABLE: GPGME $ver < 2.3.0 on $(hostname) - CVE-2026-129975 exposed"

# --- 3. Attempt package-manager upgrade ---
if command -v apt-get >/dev/null 2>&1; then
  apt-get update -qq
  apt-get install -y --only-upgrade libgpgme11 libgpgmepp6 libqgpgme* 2>/dev/null \
    && log "ACTION: apt upgrade attempted for GPGME packages"
elif command -v dnf >/dev/null 2>&1; then

```bash
  dnf upgrade -y gpgme gpgme-devel 2>/dev/null && log "ACTION: dnf upgrade attempted"

elif command -v yum >/dev/null 2>&1; then

Bash / Shell
  yum update -y gpgme 2>/dev/null && log "ACTION: yum update attempted"

elif command -v zypper >/dev/null 2>&1; then zypper --non-interactive update gpgme libgpgme11 2>/dev/null && log "ACTION: zypper update attempted" else log "WARN: No supported package manager found - manual patching required\

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.