Skip to main content

Out-of-bounds Write

CVE-2022-39260

Severity High
Score 8.8/10

Summary

Git is an open-source, scalable, distributed revision control system. `git shell` is a restricted login shell that can be used to implement Git's "push/pull" functionality via SSH. In versions prior to 2.30.6, 2.31.x prior to 2.31.5, 2.32.x prior to 2.32.4, 2.33.x prior to 2.33.5, 2.34.x prior to 2.34.5, 2.35.x prior to 2.35.5, 2.36.x prior to 2.36.3, 2.37.x prior to 2.37.4 and 2.38.x prior to 2.38.0, the function that splits the command arguments into an array improperly uses an `int` to represent the number of entries in the array, allowing a malicious actor to intentionally overflow the return value, leading to arbitrary heap writes. Because the resulting array is then passed to `execv()`, it is possible to leverage this attack to gain remote code execution on a victim's machine. Note that a victim must first allow access to a `git shell` as a login shell in order to be vulnerable to this attack. Users are advised to upgrade to the latest version. Disabling `git shell` access via remote logins is a viable short-term workaround.

  • LOW
  • NETWORK
  • HIGH
  • UNCHANGED
  • REQUIRED
  • NONE
  • HIGH
  • HIGH

CWE-787 - Out-of-Bounds Write

Out-of-bounds write vulnerability is a memory access bug that allows software to write data past the end or before the beginning of the intended buffer. This may result in the corruption of data, a crash, or arbitrary code execution.

Advisory Timeline

  • Published