Heap-Based Buffer Over-Read Vulnerability in Binutils: CVE-2018-20712

binutils Updated 02 Oct 2025

Summary

15/01/2019
N/A
Yes i
Medium
6.5

ALPINE-CVE-2018-20712: A heap-based buffer over-read exists in the function d_expression_1 in cp-demangle.c in GNU libiberty, as distributed in GNU Binutils 2.31.1. Affects binutils versions < 2.32-r0. Fixed in 2.32-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

GNU Binutils is a collection of binary tools that assist in the management and manipulation of binary files, including object files and executable files. It provides essential functionalities such as linking, assembling, and disassembling. The package is widely used in various software development environments. However, it has been identified to have a vulnerability that can lead to severe consequences if exploited.

Vulnerability Detail

A heap-based buffer over-read exists in the function d_expression_1 in cp-demangle.c within GNU libiberty, as distributed in GNU Binutils version 2.31.1. This vulnerability can be triggered by a crafted input, potentially causing segmentation faults and resulting in denial-of-service conditions. The technical aspect of this vulnerability lies in the improper handling of memory, which allows attackers to exploit the buffer over-read.

How To Fix

Minimum fixed version

2.32-r0

This is the first release that contains the fix.

sudo apk add --upgrade binutils

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate patching is not feasible, consider implementing input validation to sanitize and restrict the types of inputs that can be processed by the affected function. This can help mitigate the risk of triggering the vulnerability.

Conclusion

The CVE-2018-20712 vulnerability in GNU Binutils poses a significant risk due to its potential to cause denial-of-service through a heap-based buffer over-read. It is crucial to update to the patched version to mitigate this risk and ensure the security of your applications.

See every vulnerability recorded for binutils →

Share this vulnerability

FAQ

CVE-2018-20712 is a vulnerability in GNU Binutils that allows for a heap-based buffer over-read, potentially leading to denial-of-service.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploitation of this vulnerability can lead to segmentation faults and denial-of-service conditions, impacting the availability of the affected application.

You can update the Binutils package by running the command 'apk add --update binutils=2.32-r0' in your Alpine Linux environment.

The CVSS score of this vulnerability is 6.5, indicating a moderate level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for binutils.

How To Fix

Minimum fixed version

2.32-r0

This is the first release that contains the fix.

sudo apk add --upgrade binutils

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback