CVE-2026-13732

Gdb: gdb: out-of-bounds write in stabs parser read_member_functions() via crafted elf

Published Aug 31, 2026 CVSS 3.1 · 7 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A flaw in GDB’s STABS parser allows an out‑of‑bounds write during the processing of the read_member_functions() routine. The vulnerability is triggered when a user loads an ELF binary containing malicious .stab and .stabstr sections, causing an out‑of‑bounds overwrite of adjacent memory that can be leveraged to execute arbitrary commands inside the GDB process. This defect is a classic buffer overflow (CWE‑787) and can be triggered by simple debugging actions such as setting a breakpoint, without needing to run the inferior program.

Affected Systems

The issue affects systems that ship GDB with STABS support on Red Hat Enterprise Linux 6 through 10 and Red Hat Hardened Images. All RHEL releases that include a GDB version that still parses STABS data are vulnerable; the specific GDB version is not listed, but the vulnerability persists until GDB 18, which is expected to drop STABS parsing altogether. Any system running GDB 17 or earlier that debugs untrusted ELF files containing STABS sections is therefore at risk.

Risk and Exploitability

The CVSS score of 7 indicates a high severity, and the EPSS score of 0.00129 (0.129%) indicates a very low, though nonzero, likelihood of exploitation. The vulnerability is not listed in CISA KEV. The attack vector is local: an attacker must cause a user or an automated system to start GDB with a crafted ELF file. Because routine debugging operations trigger the flaw, a local attacker can hijack the debugger process to run arbitrary commands inside the GDB process, potentially escalating privileges or pivoting to other vulnerabilities. Until a vendor patch is released, mitigation requires updating GDB to a version that no longer supports STABS or avoiding debugging untrusted binaries.

Remediation

Vendor Workaround

The following practices would help for avoiding exposure and mitigate this flaw: - Do not open untrusted or unknown ELF binaries in GDB without first stripping debug sections. Use `objcopy --remove-section=.stab --remove-section=.stabstr <binary>` before debugging. - Use `readelf -S <binary> | grep stab` to check for the presence of STABS sections before opening a binary in GDB. Legitimate modern binaries use DWARF, not STABS. - Consider using LLDB or other debuggers that do not support STABS for analysis of untrusted binaries. - For automated environments (CI, test farms) that invoke GDB on potentially untrusted binaries, run GDB in a sandboxed or containerized environment with restricted filesystem access. - GDB 17+ deprecates STABS support but still parses it. GDB 18 (expected late 2026/2027) will remove STABS support entirely. - GCC removed STABS emitting in GCC 13 (2023), so legitimately compiled binaries from recent GCC versions will not contain STABS data.


OpenCVE Recommended Actions

  • Update GDB to a patched version that removes STABS support (e.g., GDB 18 once released) or use a vendor‑provided GDB that contains the fix.
  • Strip STABS sections from any ELF binaries before loading them in GDB with objcopy --remove-section=.stab --remove-section=.stabstr.
  • Verify whether a binary contains STABS sections with readelf -S <binary> | grep stab before debugging; if present, avoid using GDB for that binary or use an alternative debugger.
  • Run GDB in a sandboxed or containerized environment with restricted filesystem access when debugging potentially untrusted binaries.

Generated by OpenCVE AI on September 4, 2026 at 16:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
References
Link Providers
https://access.redhat.com/errata/RHSA-2026:73425 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:73426 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:73427 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:79357 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:82447 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:82939 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:96095 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:96096 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:96097 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:96098 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98414 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98415 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98416 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98417 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98419 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98420 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98421 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98423 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98427 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98428 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98429 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98430 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98431 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98432 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98434 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98435 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98436 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98437 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98438 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98439 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98440 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98441 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:98443 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:99594 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:99596 cve-icon cve-icon
https://access.redhat.com/errata/RHSA-2026:99597 cve-icon cve-icon
https://access.redhat.com/security/cve/CVE-2026-13732 cve-icon cve-icon
https://bugzilla.redhat.com/show_bug.cgi?id=2494416 cve-icon cve-icon
History
Type Values Removed Values Added
CPEs cpe:/a:redhat:rhel_aus:8.6::appstream
cpe:/a:redhat:rhel_eus_long_life:8.6::appstream
References
Type Values Removed Values Added
First Time appeared Redhat rhel Aus
Redhat rhel Eus Long Life
Redhat rhel Tus
CPEs cpe:/a:redhat:rhel_aus:8.4::appstream
cpe:/a:redhat:rhel_e4s:8.8::appstream
cpe:/a:redhat:rhel_eus_long_life:8.4::appstream
cpe:/a:redhat:rhel_tus:8.8::appstream
Vendors & Products Redhat rhel Aus
Redhat rhel Eus Long Life
Redhat rhel Tus
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:rhel_e4s:9.4::appstream
References
Type Values Removed Values Added
First Time appeared Redhat rhel E4s
Redhat rhel Eus
CPEs cpe:/a:redhat:rhel_e4s:9.2::appstream
cpe:/a:redhat:rhel_eus:9.6::appstream
Vendors & Products Redhat rhel E4s
Redhat rhel Eus
References
Type Values Removed Values Added
First Time appeared Redhat enterprise Linux Eus
CPEs cpe:/o:redhat:enterprise_linux_eus:10.0
Vendors & Products Redhat enterprise Linux Eus
References
Type Values Removed Values Added
First Time appeared Redhat rhel Els
CPEs cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:rhel_els:6
cpe:/o:redhat:rhel_els:7
Vendors & Products Redhat rhel Els
Type Values Removed Values Added
First Time appeared Redhat rhui
CPEs cpe:/a:redhat:rhui:5::el9
Vendors & Products Redhat rhui
References
Type Values Removed Values Added
First Time appeared Redhat cost Management On Premise
CPEs cpe:/a:redhat:cost_management_on_premise:1::el10
Vendors & Products Redhat cost Management On Premise
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:9 cpe:/a:redhat:enterprise_linux:9::appstream
References
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:8
cpe:/a:redhat:enterprise_linux:8::appstream
cpe:/o:redhat:enterprise_linux:10.2
References
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV3_1

{'score': 7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Redhat hardened Images
Vendors & Products Redhat hardened Images
Type Values Removed Values Added
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.
Title Gdb: gdb: out-of-bounds write in stabs parser read_member_functions() via crafted elf
First Time appeared Redhat
Redhat enterprise Linux
Redhat hummingbird
Weaknesses CWE-787
CPEs cpe:/a:redhat:hummingbird:1
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Redhat hummingbird
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}