Integer Overflow Vulnerability in libgit2: Denial of Service Risk

libgit2 Updated 03 Oct 2025

Summary

14/03/2018
N/A
No i
Medium
6.5

UBUNTU-CVE-2018-8098: Integer overflow in the index.c:read_entry() function while decompressing a compressed prefix length in libgit2 before v0.26.2 allows an attacker to cause a denial of service (out-of-bounds read) via a crafted repository... Affects libgit2 versions 0.19.0-2 – 0.19.0-2ubuntu0.4+esm1. No fix is published. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

libgit2 is a portable, pure C implementation of the Git core methods provided as a re-entrant library with a focus on performance and ease of use. It is widely used in various applications for version control and repository management. However, certain versions of libgit2 are vulnerable to an integer overflow issue that can lead to denial of service, making it critical for users to be aware of this vulnerability.

Vulnerability Detail

The vulnerability identified as CVE-2018-8098 arises from an integer overflow in the index.c:read_entry() function of libgit2 prior to version 0.26.2. This flaw allows an attacker to exploit a crafted repository index file, leading to an out-of-bounds read and potentially causing a denial of service. The vulnerability has a CVSS score of 6.5, indicating a moderate risk level that could affect the stability and security of applications relying on this library.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If immediate patching is not feasible, consider restricting access to the affected applications or services that utilize libgit2 until the update can be applied. Additionally, validate and sanitize any repository index files before processing them to mitigate potential exploitation.

Conclusion

The integer overflow vulnerability in libgit2 poses a significant risk to applications utilizing this library. Users are strongly encouraged to update to the latest patched versions to safeguard against potential denial of service attacks. Awareness and prompt action are key to maintaining application security.

See every vulnerability recorded for libgit2 →

Share this vulnerability

FAQ

CVE-2018-8098 is a vulnerability in libgit2 that allows for denial of service due to an integer overflow in the index.c:read_entry() function.

Versions of libgit2 prior to 0.26.2 are affected by this vulnerability.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using a manifest file like package-lock.json. Visit Vulert Scanner to check your application without signup.

Exploitation of this vulnerability can lead to denial of service, causing applications to crash or become unresponsive.

Restrict access to the affected applications and validate repository index files to prevent exploitation until a patch can be applied.

Related vulnerabilities

Recent vulnerabilities recorded for libgit2.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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