CVE-2022-23642
A public proof of concept exists; no exploitation attested.
- Published2022-02-18
- Fixed in3.37
- WeaknessCWE-862 · CWE-94
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2022-02-1823:15CVE publishedNVD
- 2022-06-14Exploit-DB entryExploit-DB
Observed activity
isMalicious corpus · updated 2026-11-04 03:37 UTCBlock these indicators
- Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2022-23642?format=txt
- CSV export: https://api.ismalicious.com/edl/cve/CVE-2022-23642?format=csv
- TAXII collection of exploited CVEs
- The EDL and CSV take an API key on the Pro plan.
Versions per branch
NVD| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.37 | < 3.37 | 3.37 | NVD |
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA1 product
As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- sourcegraphAffected
- = < 3.37no fix stated
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2022-07-13
Fix
- Update Sourcegraph to 3.37
Advisories and patches
- github.comPatch
- github.comPatch
Detection
read 2026-11-03 22:42 UTC- Nuclei template
- none so far ProjectDiscovery
- Metasploit modules
- 1 moduleexploit/linux/http/sourcegraph_gitserver_sshcmdrank: excellentModule metadata: Metasploit Framework, © Rapid7, Inc., BSD-3-Clause. Metasploit Framework
Sources
- CISA-ADPSSVC decisionpoc2025-04-22
- OpenCVESSVC decisionpoc—
- CNACVSS 3.18.8known since 2026-10-23
- NVDCVSS 3.18.8read 2026-10-23
- NVDCVSS 2.06read 2026-10-23
- CNAweakness (CWE)CWE-94known since 2026-10-23
- NVDweakness (CWE)CWE-862read 2026-10-23
- FIRST EPSSEPSS score74.3 %read 2026-11-03
- PoC-in-GitHubproof of concept1read 2026-11-03
- Exploit-DBdetectionread 2026-11-03
- Metasploit FrameworkMetasploit modules1known since 2026-11-01
Identifiers
- EUVD-2022-28590same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- exploit/linux/http/sourcegraph_gitserver_sshcmdexploit moduleMetasploit Framework © Rapid7 · BSD-3-Clause
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Published
- 2022-02-18
- Last Modified
- 2026-06-17
- NVD status
- Modified
Frequently asked questions
What is CVE-2022-23642?
Is CVE-2022-23642 actively exploited?
What is the CVSS score for CVE-2022-23642?
Hear about the next vulnerability in your software
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- Exploit-DB · Exploit-DB terms of service · terms restrict redistribution
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- Metasploit Framework · BSD-3-Clause
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OpenCVE · OpenCVE terms of service · terms restrict redistribution
- PoC-in-GitHub · CC0-1.0
- CISA Vulnrichment · CC0-1.0