Skip to navigation

Threat reportVulnerabilityTL-2026-6640

GnuPG GPGME Critical Double-Free (CVE-2026-129975) Triggered by Malicious OpenPGP Key with Long User ID

criticalPATCHED

A crafted OpenPGP key with a very long user ID can trigger a double free in GPGME's gpg engine status/colon-line readers (read_status() and read_colon_line() in src/engine-gpg.c), affecting all GPGME versions before 2.3.0, including bundled and statically linked copies. GnuPG says it can be used to exfiltrate application data and that remote code execution cannot be ruled out; fixed in GPGME 2.3.1 (legacy 1.24.4, Gpg4win 5.1.2).

Key facts

IdentifiersTL-2026-6640, CVE-2026-129975
Also known asGnuPG T8557
SeverityCRITICAL
First disclosed
Affected productsGnuPG Project GPGME (GnuPG Made Easy); GnuPG Project / g10 Code Gpg4win; GnuPG Project / g10 Code GnuPG Desktop and GnuPG VS-Desktop; Various Applications using GPGME (mail clients, XMPP clients, Samba, Flatpak apps)
Weaknesses (CWE)CWE-415
MITRE ATT&CK techniquesT1005 Data from Local System, T1190 Exploit Public-Facing Application, T1203 Exploitation for Client Execution, T1499.004 Endpoint Denial of Service: Application or System Exploitation
MotivationUNKNOWN
Target sectorstechnology, government administration, enterprise, communications
Target regionsGlobal
Detection rules9 (1 shown free)
Sources6 cited sources

Detection coverage

As of 2026-11-21, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-6640 across Splunk SPL, Microsoft KQL and Sigma, covering 11 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.

Free detection: GPGME Consumer Heap Corruption / Double-Free Abort (CVE-2026-129975) - Exploitation

Detects glibc double-free and heap-corruption aborts, kernel segfaults inside libgpgme, and ANOM_ABEND / core-dump events for GPGME-linked applications (mail clients, XMPP clients, Kleopatra, gpgsm, gpg-agent) on Linux. A crafted OpenPGP key with a very long user ID triggers a double free in read_status()/read_colon_line() of libgpgme (CVE-2026-129975, CWE-415) when a read error causes an early return after realloc(); failed exploit attempts surface as process aborts. GnuPG reports no in-the-wild exploitation, so this is a hunting and early-warning detection.

  • Languages: Splunk SPL, Microsoft KQL, Sigma
  • ATT&CK: T1190, T1203, T1499.004
  • Data sources: linux:syslog, linux:auditd, journald
  • Severity: high
  • Confidence: medium

Splunk SPL

index=linux earliest=-24h (sourcetype=syslog OR sourcetype=linux_audit OR sourcetype=journald) ("double free" OR "free(): invalid pointer" OR "malloc(): corrupted" OR "corrupted size vs. prev_size" OR "munmap_chunk(): invalid pointer" OR "libgpgme" OR "type=ANOM_ABEND" OR "dumped core")
| regex _raw="(?i)(gpgme|kleopatra|thunderbird|evolution|claws-mail|kmail|neomutt|gajim|dino|profanity|gpgme-json|gpgsm|gpg-agent)"
| eval crash_class=case(match(_raw,"(?i)double free|free[(][)]: invalid pointer|munmap_chunk"),"double_free_CWE-415",match(_raw,"(?i)segfault at .* in libgpgme"),"segfault_in_libgpgme",match(_raw,"(?i)corrupted"),"heap_corruption",match(_raw,"ANOM_ABEND|dumped core"),"abnormal_exit",true(),"other")
| where crash_class!="other"
| stats count min(_time) as first_seen max(_time) as last_seen values(crash_class) as crash_class values(sourcetype) as sourcetype by host
| convert ctime(first_seen) ctime(last_seen)

Microsoft KQL

Syslog
| where TimeGenerated > ago(24h)
| where SyslogMessage has_any ("double free","free(): invalid pointer","malloc(): corrupted","corrupted size vs. prev_size","munmap_chunk(): invalid pointer") or (SyslogMessage has "segfault" and SyslogMessage has "libgpgme") or SyslogMessage has "ANOM_ABEND"
| where SyslogMessage has_any ("gpgme","libgpgme") or ProcessName has_any ("kleopatra","thunderbird","evolution","claws-mail","kmail","neomutt","gajim","dino","profanity","gpgme-json","gpgsm","gpg-agent")
| extend CrashClass = case(SyslogMessage has_any ("double free","free(): invalid pointer","munmap_chunk(): invalid pointer"), "double_free_CWE-415", SyslogMessage has "libgpgme" and SyslogMessage has "segfault", "segfault_in_libgpgme", SyslogMessage has "corrupted", "heap_corruption", "abnormal_exit")
| summarize Events=count(), FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated), CrashClasses=make_set(CrashClass) by Computer, ProcessName
| project FirstSeen, LastSeen, Computer, ProcessName, Events, CrashClasses

Sigma

title: GPGME Consumer Heap Corruption Abort - CVE-2026-129975
id: 7c1f4a52-3b8e-4d6a-9f21-5e0a8b3c1d01
status: experimental
description: Detects glibc heap-corruption and double-free abort messages, or kernel segfaults inside libgpgme, from GPGME-linked applications on Linux. This is the crash signature of a malicious OpenPGP key with a very long user ID reaching the double free in read_status()/read_colon_line() (CVE-2026-129975, CWE-415).
references:
    - https://lists.gnupg.org/pipermail/gnupg-announce/2026q4/000517.html
    - https://static.dev.gnupg.org/T8557.html
author: Threadlinqs Team
date: 2026/11/21
tags:
    - attack.initial-access
    - attack.t1190
    - attack.execution
    - attack.t1203
    - attack.impact
    - attack.t1499.004
    - cve.2026-129975
logsource:
    product: linux
    service: syslog
detection:
    keywords_heap:
        - 'double free'
        - 'free(): invalid pointer'
        - 'malloc(): corrupted'
        - 'corrupted size vs. prev_size'
        - 'munmap_chunk(): invalid pointer'
    keywords_app:
        - 'gpgme'
        - 'kleopatra'
        - 'thunderbird'
        - 'evolution'
        - 'claws-mail'
        - 'kmail'
        - 'neomutt'
        - 'gajim'
        - 'gpgme-json'
        - 'gpgsm'
    keywords_segv:
        - ' in libgpgme.so'
    condition: (keywords_heap and keywords_app) or keywords_segv
falsepositives:
    - Unrelated memory bugs in the same applications
    - Developers fuzzing or debugging GPGME
level: high

Known false positives:

  • Unrelated memory-safety crashes in the same desktop applications
  • Developers fuzzing or debugging GPGME consumers
  • Out-of-memory or hardware faults that produce segfaults in libgpgme

Tuning notes: Scope the regex to applications actually linked to libgpgme in your estate (inventory libgpgme.so versions below 2.3.1 via SBOM or ldd, including statically linked and Flatpak-bundled copies). Raise to critical when the crash follows a key import, key listing or signed-message open by the same user. Forward journald and kernel messages to syslog so glibc abort and segfault lines are indexed. Patched GPGME 2.3.1 / 1.24.4 removes true positives.

8 more detection rules (Splunk SPL, Microsoft KQL, Sigma) · unlock with TL Creds. Sign up free to unlock the detection rules or query them with the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account)
  • GnuPG Key Import/Listing From Untrusted Location or Delivery Application (CVE-2026-129975) - Exploitation · unlock with TL Creds
  • Windows [indicator] Consumer Spawning Shell or LOLBin (CVE-2026-129975) - Post-Exploitation · unlock with TL Creds
  • Linux gpg/gpgme-json Direct Outbound Connection (CVE-2026-129975) - C2 / Exfiltration · unlock with TL Creds
  • [indicator]/[indicator] Crash With Heap Corruption Exception (CVE-2026-129975) - Exploitation · unlock with TL Creds
  • Non-GnuPG Process Reading GnuPG Private Key Store (CVE-2026-129975) - Post-Exploitation · unlock with TL Creds
  • [indicator] gpg/gpgsm Direct Outbound Connection (CVE-2026-129975) - C2 / Exfiltration · unlock with TL Creds
  • [indicator] Consumer Spawning Shell, Interpreter or Downloader on Linux (CVE-2026-129975) - Post-Exploitation · unlock with TL Creds
  • [indicator] Component DNS Lookups to Unexpected or Tunnel-Like Domains (CVE-2026-129975) - C2 / Exfiltration · unlock with TL Creds

Indicators of compromise

As of 2026-11-21, Threadlinqs Intelligence tracks 11 indicators of compromise for TL-2026-6640.

Sample indicators (1 of 11)

  • File hash: 1134a407b50204ee6fb9efaa6e1451c2460e543e

Defanged, TLP:CLEAR. Full set of 11 indicators: unlock with TL Creds.

11 indicators of compromise · unlock with TL Creds. Compare plans

Technical analysis

No in-the-wild exploitation has been reported.

CVE-2026-129975 (GnuPG tracker T8557, 'Double free in GPGME read_status/read_colon_line (src/engine-gpg.c)') is a memory-safety flaw in GPGME, the library that applications use to drive GnuPG for signing, verification, encryption and key listing. The GnuPG security advisory (Werner Koch, 2026-11-20) states that all GPGME versions before 2.3.0 are affected, whether used as a shared library, a DLL, or statically linked into an application. The trigger is an OpenPGP key containing a crafted, very long user ID.

Root cause: two internal functions, read_status() and read_colon_line(), read status lines and key listings emitted by the gpg process. Each starts with a 1024-byte buffer and grows it with realloc(). The new pointer is only written back to the context at the end of the function. If a read error causes an early return after a realloc, the context still holds the previously freed pointer; when the context is later released the memory is freed a second time. The advisory notes that other allocations occurring in between may prevent the allocator's double-free checks from firing. The tracker states the vulnerable code is present up to current master and in 1.18.0 and later releases shipped in distributions.

Impact: the advisory says the double free 'can be used [to] exfiltrate data from applications by sending for example signed data' and that exploiting it to mount a Remote Code Execution attack 'can't be ruled out', so an immediate update is highly suggested. Downstream software named includes Gpg4win, GnuPG Desktop, GnuPG VS-Desktop, most mail clients, many XMPP clients, Samba and Flatpak-packaged applications. No exploitation in the wild, public PoC, CVSS score, or attribution is stated in any source; NVD returned no record for the CVE at the time of research (2026-11-21), so scoring is left null.

Timeline and fix: discovered by Johan Carlsson and reported by GitLab on 2026-11-12, who also supplied the patch; disclosure was originally planned for 2026-11-25 but moved up to 2026-11-20 because GitLab had to update early. GPGME 2.3.1 was released 2026-11-19 (2.3.0 was never publicly available), GPGME 1.24.4 (legacy branch) and Gpg4win 5.1.2 followed on 2026-11-20. Fix commits: b4358e92e33a and 14499348b966 ('Fix a double free in the status line read code'). Statically linked binaries must be rebuilt against 2.3.1; if GPGME cannot be updated, the patch attached to the advisory likely applies even to very old versions. GPGMEPP and GPGMEQT need no update.

MITRE ATT&CK techniques by tactic:

Collection

T1005 Data from Local System

Initial Access

T1190 Exploit Public-Facing Application

Execution

T1203 Exploitation for Client Execution

Impact

T1499.004 Endpoint Denial of Service: Application or System Exploitation

Remediation

Patches

  • GPGME 2.3.1 (released 2026-11-19; 2.3.0 never publicly available)
  • GPGME 1.24.4 legacy branch (2026-11-20; no guarantee of all future security patches)
  • Gpg4win 5.1.2 (2026-11-20)
  • Fix commits b4358e92e33a and 14499348b966 in GPGME

Immediate actions

  • Update the GPGME shared library/DLL to 2.3.1 (a DLL can be taken from the updated Gpg4win)
  • Update Gpg4win to 5.1.2 and GnuPG Desktop / GnuPG VS-Desktop to the new releases
  • Inventory applications that bundle or statically link GPGME (mail clients, XMPP clients, Samba, Flatpak apps) and rebuild them against GPGME 2.3.1
  • Treat OpenPGP keys from untrusted sources as hostile input until patched

Workarounds

  • If GPGME cannot be updated, apply the patch attached to the GnuPG advisory, which likely applies cleanly even to very old versions
  • GPGMEPP and GPGMEQT need no update

Longer-term hardening

  • Track bundled/static copies of GPGME in SBOMs and software composition analysis
  • Monitor GnuPG announce list and tracker for follow-up advisories
  • Run key-handling applications with least privilege and sandboxing

Affected and fixed versions

  • GnuPG Project — GPGME (GnuPG Made Easy)
    Vulnerable versions: all versions before 2.3.0 (shared, DLL and statically linked), including 1.18.0 and later distribution releases and 1.24.3 legacy
    Fixed in: 2.3.1; 1.24.4 (legacy)
  • GnuPG Project / g10 Code — Gpg4win
    Vulnerable versions: versions before 5.1.2
    Fixed in: 5.1.2
  • GnuPG Project / g10 Code — GnuPG Desktop and GnuPG VS-Desktop
    Vulnerable versions: versions bundling vulnerable GPGME
    Fixed in: new releases announced with the advisory
  • Various — Applications using GPGME (mail clients, XMPP clients, Samba, Flatpak apps)
    Vulnerable versions: any build using or statically linking GPGME before 2.3.0
    Fixed in: rebuild against GPGME 2.3.1

Timeline

  • GitLab informs the GnuPG project of the GPGME double free discovered by Johan Carlsson and supplies a patch.
  • GnuPG tracker ticket T8557 'Double free in GPGME read_status/read_colon_line (locked-ioc-4)' is created and assigned to Werner Koch.
  • T8557 moves to Testing.
  • Fix is recorded as shipped in GPGME 2.3.1 and the patch is sent to the reporter.
  • GPGME 2.3.1 is released (2.3.0 was never publicly available).
  • GnuPG publishes the security advisory for CVE-2026-129975, moved up from the planned 2026-11-25 because GitLab had to update early; fix commits added, GPGME 1.24.4 legacy and Gpg4win 5.1.2 released, T8557 closed.
  • The Hacker News reports on the flaw; NVD has no record of the CVE and no in-the-wild exploitation is reported.

Sources cited

Drafted by the Threadlinqs research pipeline from 6 sources; published ; last updated —.

Threadlinqs Intelligence — Real-Time Threat Detection Platform

// threat_feed
$ sort --newest
Showing all threats

Live intelligence console

Threat level

Latest Threats