NULL Pointer Dereference Affecting git2 package, versions <0.20.4


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUST-GIT2-15221424
  • published5 Feb 2026
  • disclosed4 Feb 2026
  • creditUnknown

Introduced: 4 Feb 2026

CVE NOT AVAILABLE CWE-476  (opens in a new tab)

How to fix?

Upgrade git2 to version 0.20.4 or higher.

Overview

Affected versions of this package are vulnerable to NULL Pointer Dereference in the slice::from_raw_parts() function. An attacker can cause a denial of service by triggering a null pointer dereference through immediate dereferencing of the Buf struct after calling new() or default().

CVSS Base Scores

version 4.0
version 3.1