CVE-2022-23642
CVSS V2 Medium 6
CVSS V3 High 8.8
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.
Overview
- CVE ID
- CVE-2022-23642
- Assigner
- security-advisories@github.com
- Vulnerability Status
- Analyzed
- Published Version
- 2022-02-18T23:15:09
- Last Modified Date
- 2022-10-29T02:44:40
Weakness Enumerations
CPE Configuration (Product)
CPE | Vulnerable | Operator | Version Start | Version End |
---|---|---|---|---|
cpe:2.3:a:sourcegraph:sourcegraph:*:*:*:*:*:*:*:* | 1 | OR | 3.37 |
CVSS Version 2
- Version
- 2.0
- Vector String
- AV:N/AC:M/Au:S/C:P/I:P/A:P
- Access Vector
- NETWORK
- Access Compatibility
- MEDIUM
- Authentication
- SINGLE
- Confidentiality Impact
- PARTIAL
- Integrity Impact
- PARTIAL
- Availability Impact
- PARTIAL
- Base Score
- 6
- Severity
- MEDIUM
- Exploitability Score
- 6.8
- Impact Score
- 6.4
CVSS Version 3
- Version
- 3.1
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack Vector
- NETWORK
- Attack Compatibility
- LOW
- Privileges Required
- LOW
- User Interaction
- NONE
- Scope
- UNCHANGED
- Confidentiality Impact
- HIGH
- Availability Impact
- HIGH
- Base Score
- 8.8
- Base Severity
- HIGH
- Exploitability Score
- 2.8
- Impact Score
- 5.9
References
Reference URL | Reference Tags |
---|---|
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 |
Sources
Source Name | Source URL |
---|---|
NIST | https://nvd.nist.gov/vuln/detail/CVE-2022-23642 |
MITRE | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23642 |
History
Created | Old Value | New Value | Data Type | Notes |
---|---|---|---|---|
2022-05-10 15:47:12 | Added to TrackCVE | |||
2022-12-06 10:23:17 | 2022-02-18T23:15Z | 2022-02-18T23:15:09 | CVE Published Date | updated |
2022-12-06 10:23:17 | 2022-10-29T02:44:40 | CVE Modified Date | updated | |
2022-12-06 10:23:18 | Analyzed | Vulnerability Status | updated | |
2022-12-06 10:23:23 | References | updated |