Infinite Loop Affecting libgit2-sys package, versions <0.16.2+1.7.2


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.28% (70th percentile)

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-LIBGIT2SYS-6249444
  • published16 Feb 2024
  • disclosed6 Feb 2024
  • creditMichael Rodler

Introduced: 6 Feb 2024

CVE-2024-24575  (opens in a new tab)
CWE-835  (opens in a new tab)

How to fix?

Upgrade libgit2-sys to version 0.16.2+1.7.2 or higher.

Overview

libgit2-sys is a bindings for Rust.

Affected versions of this package are vulnerable to Infinite Loop in the git_revparse_single function in src/libgit2/revparse.c. An attacker can cause the function to enter an infinite loop. The revparse function uses a loop to parse the user-provided spec string, and there is an edge-case during parsing that allows a bad actor to force the loop conditions to access arbitrary memory. Potentially, this could also leak memory if the extracted rev spec is reflected back to the attacker.

CVSS Scores

version 3.1