Critical Remote Code Execution Vulnerability in libgit2: CVE-2020-12279

libgit2 Updated 03 Oct 2025

Summary

27/04/2020
N/A
No i
Critical
9.8

UBUNTU-CVE-2020-12279: An issue was discovered in libgit2 before 0.28.4 and 0.9x before 0.99.0. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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 is designed to be efficient and lightweight, making it suitable for embedding in applications. However, it has been found vulnerable to a critical issue that can lead to remote code execution under specific conditions.

Vulnerability Detail

An issue was discovered in libgit2 versions before 0.28.4 and 0.9x before 0.99.0, specifically in the checkout.c file. This vulnerability arises from the mishandling of equivalent filenames that exist due to NTFS short names. An attacker could exploit this flaw when a user clones a repository containing maliciously crafted filenames, potentially leading to remote code execution. This vulnerability is similar to CVE-2019-1353 and has a CVSS score of 9.8, indicating a critical severity level.

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 workaround, users can avoid cloning repositories from untrusted sources or those that may contain malicious filenames until the package is updated to a secure version.

Conclusion

The vulnerability CVE-2020-12279 in libgit2 poses a significant risk due to its potential for remote code execution. Users are strongly advised to update their libgit2 packages to the latest patched versions to safeguard their systems. Utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.

See every vulnerability recorded for libgit2 →

Share this vulnerability

FAQ

CVE-2020-12279 is a critical vulnerability in libgit2 that allows for remote code execution due to mishandling of NTFS short names.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Check your application against CVE-2020-12279 using the Vulert playground at Vulert Scanner.

Exploitation of this vulnerability can lead to remote code execution, allowing attackers to execute arbitrary code on the affected system.

Yes, a patched version of libgit2 is available. Users should update to version 0.28.4 or later to mitigate the risk.

If immediate updates are not possible, avoid cloning repositories from untrusted sources as a temporary measure until the package can be updated.

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