Main
Vulnerability Database
Exploits
ID:6119 - Exploit for Command injection in Git products - CVE-2018-17456
ID:6119 - Exploit for Command injection in Git products - CVE-2018-17456
Published: June 17, 2021
Vulnerability identifier: #VU15167
Vulnerability risk: High
CVE-ID: CVE-2018-17456
CWE-ID: CWE-77
Exploitation vector: Remote access
Vulnerable software:
Git
GitHub Desktop
Atom
Git
GitHub Desktop
Atom
Link to public exploit:
Vulnerability description
The vulnerability allows a remote attacker to execute arbitrary commands on the target system.
The weakness exists in the Git command line client, Git Desktop, and Atom due to command injection during processing of a recursive "git clone" of a superproject if a .gitmodules file has a URL field beginning with a '-' character.. A remote attacker can use a specially crafted.gitmodules file that contains an URL that starts with a dash. By using a dash, when Git clones a repository using the --recurse-submodules argument, the command will interpret the URL as an option that can be used to execute arbitrary code with elevated privileges.
Successful exploitation of the vulnerability may result in system compromise.
The weakness exists in the Git command line client, Git Desktop, and Atom due to command injection during processing of a recursive "git clone" of a superproject if a .gitmodules file has a URL field beginning with a '-' character.. A remote attacker can use a specially crafted.gitmodules file that contains an URL that starts with a dash. By using a dash, when Git clones a repository using the --recurse-submodules argument, the command will interpret the URL as an option that can be used to execute arbitrary code with elevated privileges.
Successful exploitation of the vulnerability may result in system compromise.
Remediation
The vulnerability has been fixed in Git 2.19.1 (with backports in 2.14.5, 2.15.3, 2.16.5, 2.17.2, and 2.18.1), GitHub Desktop 1.4.2 and 1.4.3-beta0, and Atom 1.31.2 and 1.32.0-beta3.