CVE-2022-23642
Summary
| CVE | CVE-2022-23642 |
|---|---|
| State | PUBLIC |
| Assigner | [email protected] |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2022-02-18 23:15:00 UTC |
| Updated | 2023-06-27 19:01:00 UTC |
| Description | Sourcegraph is a code search and navigation engine. Sourcegraph prior to version 3.37 is vulnerable to remote code execution in the `gitserver` service. The service acts as a git exec proxy, and fails to properly restrict calling `git config`. This allows an attacker to set the git `core.sshCommand` option, which sets git to use the specified command instead of ssh when they need to connect to a remote system. Exploitation of this vulnerability depends on how Sourcegraph is deployed. An attacker able to make HTTP requests to internal services like gitserver is able to exploit it. This issue is patched in Sourcegraph version 3.37. As a workaround, ensure that requests to gitserver are properly protected. |
Risk And Classification
Problem Types: CWE-862
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Application | Sourcegraph | Sourcegraph | All | All | All | All |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| gitserver: Only allow acceptable commands and POST method in /exec by indradhanush · Pull Request #30833 · sourcegraph/sourcegraph · GitHub | MISC | github.com | |
| Remote Code Execution in gitserver · Advisory · sourcegraph/sourcegraph · GitHub | CONFIRM | github.com | |
| Sourcegraph Gitserver 3.36.3 Remote Code Execution ≈ Packet Storm | MISC | packetstormsecurity.com | |
| Sourcegraph gitserver sshCommand Remote Command Execution ≈ Packet Storm | MISC | packetstormsecurity.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.