Critical Integer Overflow Vulnerability in libgc Package Leading to Potential Code Execution

libgc Updated 02 Oct 2025

Summary

12/12/2016
N/A
Yes i
Critical
9.8

CVE-2016-9427: Integer overflow vulnerability in bdwgc before 2016-09-27 allows attackers to cause client of bdwgc denial of service (heap buffer overflow crash) and possibly execute arbitrary code via huge allocation. Affects libgc across 2 version ranges.

< 1:7.6.4-0.3 < d8bfa89c2a9c7c86fb98acbc53b5750600b95492

Fixed in 1:7.6.4-0.3. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The libgc package, also known as Boehm-Demers-Weiser garbage collector, is a widely used memory management library in C and C++ programming. It provides automatic garbage collection, which helps in managing memory allocation and deallocation without manual intervention. However, the package has been found to be vulnerable to an integer overflow issue that can lead to severe consequences, including denial of service and potential arbitrary code execution.

Vulnerability Detail

The integer overflow vulnerability in bdwgc, identified as CVE-2016-9427, was discovered prior to September 27, 2016. This flaw allows attackers to exploit the library by causing a heap buffer overflow crash in clients using bdwgc. The vulnerability arises from improper handling of large memory allocation requests, which can lead to unexpected behavior and crashes. If successfully exploited, this vulnerability could allow an attacker to execute arbitrary code, posing a significant risk to systems utilizing the affected library.

How To Fix

Minimum fixed version

1:7.6.4-0.3

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libgc

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

Workaround

As a temporary workaround, users can limit the size of memory allocations in their applications to avoid triggering the overflow condition. However, this is not a permanent solution and updating the package is strongly advised.

Conclusion

The integer overflow vulnerability in the libgc package poses a significant risk to applications that rely on this library for memory management. It is crucial for users to update to the fixed version to mitigate the risks associated with this vulnerability. Regular monitoring and vulnerability management practices, such as using tools like Vulert, can help in maintaining application security.

See every vulnerability recorded for libgc →

Share this vulnerability

FAQ

CVE-2016-9427 is an integer overflow vulnerability in the libgc package that can lead to denial of service and potential arbitrary code execution.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The CVSS score for CVE-2016-9427 is 9.8, indicating a critical level of severity.

If immediate updates are not possible, consider implementing memory allocation limits in your applications as a temporary workaround.

More information can be found in the official CVE database and related security advisories linked to this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for libgc.

How To Fix

Minimum fixed version

1:7.6.4-0.3

This is the first release that contains the fix.

sudo apt-get install --only-upgrade libgc

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