ZeroHour

CVE-2026-13732

mass

Out-of-bounds write in GNU GDB STABS parser allows command execution via crafted ELF

CVSS 3.1
7.0 high
EPSS
<1%p2
Published
()
Modified
AI analysis

The GNU Debugger (GDB) contains an out-of-bounds write (CWE-787) in its legacy STABS debug format parser: the read_member_functions() function in gdb/stabsread.c mishandles removal of destructor entries from a linked list of C++ class member functions, leaving destructor entries in the list while its length counter is decremented, which corrupts memory when the list is copied into its final allocated array. An attacker triggers it by crafting an ELF binary with malicious .stab and .stabstr sections; the bug fires when a user opens that file in GDB and performs any symbol-inspection operation such as setting a breakpoint, and the target program does not need to be executed. Under controlled conditions the flaw was demonstrated to achieve execution of arbitrary commands within the GDB process, so an attacker who can get a crafted binary opened by a victim gains code execution on that machine with the victim's privileges. Affected users are developers, reverse engineers, malware analysts, and automated pipelines that inspect third-party or untrusted ELF files with GDB; the advisory data does not specify affected or fixed version numbers. No in-the-wild exploitation, public proof-of-concept, or CISA KEV listing is known, and EPSS assigns only a 0.1% 30-day exploitation probability (2nd percentile), consistent with the local (AV:L), high-complexity, user-interaction-dependent (UI:R) attack path.

What to do: Until a patched gdb package is available from your distribution or vendor (Red Hat is the CNA, and no fixed version is given in this data), avoid opening untrusted or attacker-supplied ELF binaries in GDB and monitor vendor advisories to upgrade as soon as the fix ships. Note that the trigger requires no execution of the target - merely opening the file and any symbol-inspection action such as setting a breakpoint - so not running the binary is not protection; files containing only DWARF and no .stab/.stabstr sections bypass the vulnerable path, but attackers can deliberately include STABS sections, so do not rely on modern default DWARF output as a defense. If third-party ELF inspection is unavoidable, perform it on a fully updated system or with non-GDB tooling, and check your exposure…

Affected
GNU GDB (GNU Debugger) - STABS debug format parser, gdb/stabsread.c (read_member_functions)
Estimated exposure
masstens of millions of installations have GDB available (packaged in virtually every Linux distribution and GNU/embedded cross-toolchain), with plausibly millions… — The estimate is based on GDB's near-universal packaging in Linux distributions, GNU toolchains, embedded SDKs and reverse-engineering toolkits, which puts the installed base in the tens of millions, while noting that only the subset of…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

A flaw was found in GDB's STABS debug format parser. The read_member_functions() function in gdb/stabsread.c contains a linked list removal bug in the code that separates destructor and non-destructor member functions of C++ classes. The bug causes the destructor entries to remain in the main function list while the list length counter is decremented, resulting in an out-of-bounds write when the function list is copied to its final allocated array. An attacker can craft an ELF binary with malicious .stab and .stabstr sections that triggers this out-of-bounds write when a user opens the file in GDB and performs any symbol-inspection operation such as setting a breakpoint. The inferior process does not need to be executed. Under controlled conditions, this was demonstrated to achieve execution of arbitrary commands within the GDB process.

Weakness
CWE-787
Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

In the news

No ingested article mentions this CVE yet.