Critical Buffer Overflow Vulnerability in libgit2: CVE-2016-10128

libgit2 Updated 02 Oct 2025

Summary

24/03/2017
N/A
Yes i
Critical
9.8

ALPINE-CVE-2016-10128: Buffer overflow in the git_pkt_parse_line function in transports/smart_pkt.c in the Git Smart Protocol support in libgit2 before 0.24.6 and 0.25.x before 0.25.1 allows remote attackers to have unspecified impact via a cr... Affects libgit2 versions < 0.25.1-r0. Fixed in 0.25.1-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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 library's functionality includes support for the Git Smart Protocol, which allows for efficient communication between clients and servers. However, it is susceptible to a buffer overflow vulnerability that can be exploited by remote attackers, potentially leading to severe security implications.

Vulnerability Detail

The vulnerability, identified as CVE-2016-10128, originates from a buffer overflow in the git_pkt_parse_line function within the transports/smart_pkt.c file of libgit2. This flaw allows remote attackers to exploit crafted non-flush packets, leading to unspecified impacts such as data corruption, unauthorized access, or denial of service. The vulnerability affects versions of libgit2 prior to 0.24.6 and 0.25.x before 0.25.1, with a CVSS score of 9.8 indicating its critical nature.

How To Fix

Minimum fixed version

0.25.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade libgit2

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

Workaround

As a temporary workaround, users may consider disabling the Git Smart Protocol if feasible, or implementing network-level controls to restrict access to the affected services until the library can be updated.

Conclusion

The buffer overflow vulnerability CVE-2016-10128 in libgit2 poses significant risks to applications utilizing this library. It is crucial for users to update to the patched versions to mitigate potential exploitation. Utilizing tools like Vulert can aid in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for libgit2 →

Share this vulnerability

FAQ

CVE-2016-10128 is a critical buffer overflow vulnerability in libgit2 that can be exploited by remote attackers through crafted packets.

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 data corruption, unauthorized access, or denial of service, posing significant risks to applications using libgit2.

You can update libgit2 using the command 'apk add libgit2=0.25.1-r0' to ensure you are using a patched version.

Vulert monitors and alerts for open-source vulnerabilities in software using just a manifest file. It provides real-time alerts and insights into potential vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for libgit2.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

0.25.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade libgit2

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