Skip to content
Fencer Intel
high 7.5

CVE-2018-20657 json

The demangle_template function in cplus-dem.c in GNU libiberty, as distributed in GNU Binutils 2.31.1, has a memory leak via a crafted stri…

published 2019-01-02 7 y ago modified 2026-06-17 4 mo ago also EUVD-2018-13208

cvss
7.5
version 3.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
4.0%
EPSS 4.0% chance of exploitation in 30 days, percentile 90%
public exploits
0
none known

Summary

The demangle_template function in cplus-dem.c in GNU libiberty, as distributed in GNU Binutils 2.31.1, has a memory leak via a crafted string, leading to a denial of service (memory consumption), as demonstrated by cxxfilt, a related issue to CVE-2018-12698.

Patch / fix

  • gdb RHEL 8 8.2-6.el8
  • gdb-headless RHEL 8 8.2-6.el8
  • gdb-gdbserver RHEL 8 8.2-6.el8

red hat advisories RHSA-2019:3352

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2018-20657 updated cvss 3.3

libiberty: Memory leak in demangle_template function resulting in a denial of service

  • Red Hat Enterprise Linux 5 gcc, gdb, binutils Red Hat Enterprise Linux 6 cpp, gcc, gdb, libgcc, libgcj, libitm, +17 more Red Hat Enterprise Linux 7 cpp, gcc, gdb, libgo, gcc-go, libgcc, +18 more Red Hat Enterprise Linux 8 cpp, gcc, libgcc, libitm, gcc-c++, libasan, +18 more
    affected: no fix planned “Will not fix”
  • Red Hat Enterprise Linux AppStream (v. 8) gdb 8.2-6.el8, gdb-headless 8.2-6.el8, gdb-gdbserver 8.2-6.el8
    fixed: vendor fix RHSA-2019:3352

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

4.00% chance of exploitation in the next 30 days, higher than 90% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • gcc.gnu.org https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88539 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.0 7.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD 2.0 5.0 AV:N/AC:L/Au:N/C:N/I:N/A:P

Classification

Weakness
  • CWE-772 Missing Release of Resource after Effective Lifetime

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.