CVE-2022-39260: high-severity vulnerability in git
Git vulnerable to Remote Code Execution via Heap overflow in `git shell`
Published · Updated
E-mail alert when it lands in KEV, gets a public PoC or its score goes up.
No sign of exploitation. No public exploitation artifact known so far.
Git's restricted shell (`git shell`) contains a heap overflow vulnerability that allows attackers to execute arbitrary code on a server. An attacker with SSH access to `git shell` can craft a malicious command that overflows memory and takes control of the system.
The vulnerability exists in the argument-splitting function of `git shell`, which uses a 32-bit integer to track array size, enabling integer overflow. An authenticated attacker can send a specially crafted command via SSH that overflows the heap, corrupts memory, and passes a malicious argument array to `execv()`, achieving remote code execution. Exploitation requires prior SSH access to `git shell` as a login shell.
In the same product, most dangerous first.