---
id: CVE-2018-18700
title: >-
  An issue was discovered in cp-demangle.c in GNU libiberty, as distributed in
  GNU Binutils 2.31
summary: >-
  An issue was discovered in cp-demangle.c in GNU libiberty, as distributed in
  GNU Binutils 2.31. There is a stack consumption vulnerability resulting from
  infinite recursion in the functions d_name(), d_encoding(), and d_local_name()
  in c…
severity: medium
cvss: 5.5
cvssVector: 'CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'
cwe:
  - CWE-835
vendor: gnu
product: binutils
affected:
  - binutils = 2.31
published: '2018-10-29'
updated: '2026-10-15'
sourceUpdated: '2026-10-15T18:17:15.173'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2018-18700'
references:
  - url: 'https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87681'
    label: cve@mitre.org
  - url: 'https://usn.ubuntu.com/4326-1/'
    label: cve@mitre.org
  - url: 'https://usn.ubuntu.com/4336-1/'
    label: cve@mitre.org
  - url: 'https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87681'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://usn.ubuntu.com/4326-1/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://usn.ubuntu.com/4336-1/'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
  - cve.org
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-10-15T17:36:13.726943Z'
epss: 0.01686
epssPercentile: 0.76604
ingestedAt: '2026-10-15T18:23:58.396Z'
---

## Overview

An issue was discovered in cp-demangle.c in GNU libiberty, as distributed in GNU Binutils 2.31. There is a stack consumption vulnerability resulting from infinite recursion in the functions d_name(), d_encoding(), and d_local_name() in cp-demangle.c. Remote attackers could leverage this vulnerability to cause a denial-of-service via an ELF file, as demonstrated by nm.

## Affected

- `binutils = 2.31`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
