CVE-2022-23642
Sourcegraph gitserver Remote Code Execution
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.
INFO
Published Date :
Feb. 18, 2022, 11:15 p.m.
Last Modified :
Nov. 21, 2024, 6:49 a.m.
Source :
[email protected]
Remotely Exploitable :
Yes !
Impact Score :
5.9
Exploitability Score :
2.8
Public PoC/Exploit Available at Github
CVE-2022-23642 has a 8 public PoC/Exploit
available at Github.
Go to the Public Exploits
tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2022-23642
.
URL | Resource |
---|---|
http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html | Exploit Third Party Advisory VDB Entry |
http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html | Exploit Third Party Advisory VDB Entry |
https://github.com/sourcegraph/sourcegraph/pull/30833 | Patch Third Party Advisory |
https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9 | Patch Third Party Advisory |
http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html | Exploit Third Party Advisory VDB Entry |
http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html | Exploit Third Party Advisory VDB Entry |
https://github.com/sourcegraph/sourcegraph/pull/30833 | Patch Third Party Advisory |
https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9 | Patch Third Party Advisory |
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
All CVE - PoC in GitHub
poc proofofconcept tester allcve cvegithub cvenew cvepoc cveupdate
None
None
None
None
PoC for Sourcegraph Gitserver < 3.37.0 RCE (CVE-2022-23642)
Python
test 反向辣鸡数据投放 CVE-2022-23305 工具 利用 教程 Exploit POC
cve-2020-
🍆 My GitHub Profile
Go
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2022-23642
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2022-23642
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html Added Reference http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html Added Reference https://github.com/sourcegraph/sourcegraph/pull/30833 Added Reference https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9 -
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
Reanalysis by [email protected]
Jun. 27, 2023
Action Type Old Value New Value Added CWE NIST CWE-862 -
Modified Analysis by [email protected]
Oct. 29, 2022
Action Type Old Value New Value Changed Reference Type http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html No Types Assigned http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html Exploit, Third Party Advisory, VDB Entry Changed Reference Type http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html No Types Assigned http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html Exploit, Third Party Advisory, VDB Entry -
CVE Modified by [email protected]
Jul. 13, 2022
Action Type Old Value New Value Added Reference http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html [No Types Assigned] -
CVE Modified by [email protected]
Jun. 20, 2022
Action Type Old Value New Value Added Reference http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html [No Types Assigned] -
Initial Analysis by [email protected]
Mar. 07, 2022
Action Type Old Value New Value Added CVSS V2 NIST (AV:N/AC:M/Au:S/C:P/I:P/A:P) Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Changed Reference Type https://github.com/sourcegraph/sourcegraph/pull/30833 No Types Assigned https://github.com/sourcegraph/sourcegraph/pull/30833 Patch, Third Party Advisory Changed Reference Type https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9 No Types Assigned https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9 Patch, Third Party Advisory Added CPE Configuration OR *cpe:2.3:a:sourcegraph:sourcegraph:*:*:*:*:*:*:*:* versions up to (excluding) 3.37
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2022-23642
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2022-23642
weaknesses.
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
96.63 }} -0.02%
score
0.99759
percentile