Denial of Service Vulnerability in libgit2: CVE-2018-8099

libgit2 Updated 03 Oct 2025

Summary

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

UBUNTU-CVE-2018-8099: Incorrect returning of an error code in the index.c:read_entry() function leads to a double free in libgit2 before v0.26.2, which allows an attacker to cause a denial of service via a crafted repository index file. 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 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

libgit2 is a portable, pure C implementation of the Git core methods provided as a re-entrant library with a solid API. It is widely used in various applications for version control and repository management. The vulnerability CVE-2018-8099 affects multiple versions of libgit2, specifically versions prior to 0.26.2, allowing attackers to exploit the library through crafted repository index files.

Vulnerability Detail

The vulnerability arises from an incorrect error code return in the index.c:read_entry() function, which leads to a double free scenario in libgit2. This flaw can be exploited by an attacker to cause a denial of service, potentially crashing applications that rely on the library. The issue is critical as it can disrupt services and lead to application instability.

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

As a temporary measure, users can avoid processing untrusted repository index files until the library is updated. This can help mitigate the risk of exploitation while waiting for a patch.

Conclusion

CVE-2018-8099 represents a significant vulnerability in libgit2 that can lead to denial of service. Users are strongly advised to update to the latest version to protect their applications from potential exploitation. Utilizing tools like Vulert can assist in monitoring for such vulnerabilities effectively.

See every vulnerability recorded for libgit2 →

Share this vulnerability

FAQ

CVE-2018-8099 is a vulnerability in libgit2 that allows for denial of service due to a double free error in the library's code.

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

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.

If an immediate update is not possible, avoid processing untrusted repository index files to mitigate the risk of exploitation.

The CVSS score for CVE-2018-8099 is 6.5, indicating a medium severity level.

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