Remote code execution via split_cmdline integer overflow
Published Oct 19, 2022 · Updated Aug 3, 2024
Heap overflow in Git allows remote authenticated users to execute arbitrary code through an SSH-exposed interactive git shell. split_cmdline() stores string indexes and argument counts in signed int variables, so input longer than 2 GiB wraps them and causes out-of-bounds heap reads and writes before execv() receives the array. Exploitation requires Git server access and a login account configured for git shell with the $HOME/git-shell-commands directory present; code runs as that account.
Summary
What happened
Heap overflow in Git allows remote authenticated users to execute arbitrary code through an SSH-exposed interactive git shell. split_cmdline() stores string indexes and argument counts in signed int variables, so input longer than 2 GiB wraps them and causes out-of-bounds heap reads and writes before execv() receives the array. Exploitation requires Git server access and a login account configured for git shell with the $HOME/git-shell-commands directory present; code runs as that account.
The record
- CVE
- CVE-2022-39260
- Published
- Oct 19, 2022
- Updated
- Aug 3, 2024
- Vendor
- Git
- Product
- Git
- Classifications
- CWE-787, CWE-122, T1190
- Attack vector
- network
- Privileges
- authenticated
Timeline
How it unfolded
- Oct 19, 2022CVE publishedPublication date reported by the CVE source.
- Aug 3, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=< 2.30.6
- Affected versionversion=> 2.31.0, < 2.31.5
- Affected versionversion=> 2.32.0, < 2.32.4
- Affected versionversion=> 2.33.0, < 2.33.5
- Affected versionversion=> 2.34.0, < 2.34.5
- Affected versionversion=> 2.34.0, < 2.35.5
- Affected versionversion=> 2.35.0, < 2.36.3
- Affected versionversion=> 2.37.0, < 2.37.4
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- split_cmdline proof-of-concept generatorproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo