Heap-buffer-overflow in libgit2: git__strntol64

libgit2 Updated 02 Oct 2025

Summary

13/01/2021
MEDIUM
Yes i
Medium
Not published

OSV-2018-104: Heap-buffer-overflow in git__strntol64. Affects libgit2 versions >= 7fafec0e53f8711b73912d46b43451c599aeceb3, < 4209a5125802e714a6342a74ff0835c5c4a2397d. Fixed in 4209a5125802e714a6342a74ff0835c5c4a2397d. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

libgit2 is an open-source library that provides a low-level Git implementation for various programming languages. It allows developers to interact with Git repositories, perform version control operations, and access Git's functionality programmatically. This vulnerability affects the libgit2 package and specifically the git__strntol64 function.

Vulnerability Detail

The vulnerability identified in libgit2 is a heap-buffer-overflow issue. It was reported through the OSS-Fuzz project and can be found in the following bug report: OSS-Fuzz Report. The crash type associated with this vulnerability is a heap-buffer-overflow read of 1 byte. The crash state involves the functions git__strntol64, git__strntol32, and parse_mode. The severity of this vulnerability is considered medium.

How To Fix

Minimum fixed version

4209a5125802e714a6342a74ff0835c5c4a2397d

This is the first release that contains the fix.

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

Workaround

No workaround has been provided for this vulnerability.

Conclusion

In conclusion, the libgit2 package is affected by a medium severity heap-buffer-overflow vulnerability in the git__strntol64 function. It is recommended to update the package to a version that includes the fix to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for libgit2 →

Share this vulnerability

FAQ

libgit2 is an open-source library that provides a low-level Git implementation for various programming languages.

A heap-buffer-overflow vulnerability occurs when a program writes data beyond the bounds of a dynamically allocated buffer in the heap, potentially leading to memory corruption and crashes.

This vulnerability was discovered through the OSS-Fuzz project, which performs continuous fuzzing on open-source software to identify potential vulnerabilities.

The severity of this vulnerability is considered medium.

To fix this vulnerability, update the libgit2 package to a version that includes the fix. Refer to the provided commit for the specific fix.

Related vulnerabilities

Recent vulnerabilities recorded for libgit2.

How To Fix

Minimum fixed version

4209a5125802e714a6342a74ff0835c5c4a2397d

This is the first release that contains the fix.

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