CVE-2022-23642
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 fa...
Affects 1 product across 1 vendor.
Attacker injects arbitrary code that is executed by the application process.
Software does not check whether an authenticated actor has permission for the requested operation.
Mapping is CWE-to-CAPEC per MITRE CAPEC 3.9.
Sourcegraph prior to version 3.37 is vulnerable to remote code execution due to improper restriction of the git config command in the gitserver service, allowing attackers to set the git core.sshCommand option to execute arbitrary commands.
BSID: BS-2022-GLOBAL-160538-H • Model: /workspace/models/qwen2.5-coder-32b-instruct-bf16 • Confidence: HIGH
Is this CVE in your environment?
BreachSpider monitors your ICS/OT environment for vulnerabilities like this one. No agents or network access required. Free to start.
Check My Environment →What is CVE-2022-23642?
What is the CVSS score for CVE-2022-23642?
Is CVE-2022-23642 actively exploited?
How do I remediate CVE-2022-23642?
What systems are affected by CVE-2022-23642?
| CVE ID | CVE-2022-23642 |
|---|---|
| BSID | BS-2022-GLOBAL-160538-H BreachSpider Global ID |
| CVSS 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 |
| ICS Relevance | 15% |
| Weakness (CWE) | |
| Source | NVD |
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.
Source: NIST NVD / MITRE CVE Database
An attacker can exploit this vulnerability by setting the git core.sshCommand option to a malicious command through the gitserver service, which will be executed when git attempts to connect to a remote repository.
Exploitation Likelihood: HIGH
| Vendor | Product | Affected Versions |
|---|---|---|
| Sourcegraph | Sourcegraph | < 3.37 |
No official vendor advisory link on record. See the CVE record →
| CISA known-exploited | Not in KEV catalog |
|---|---|
| Public Exploit | ⚠ Available — Reference |
| PoC Code | Not confirmed |
AI Enrichment Record — provenance & audit hash
| Model | /workspace/models/qwen2.5-coder-32b-instruct-bf16 |
|---|---|
| Confidence | HIGH |
| Enriched At | 2026-05-24 |
ICS/OT Vulnerability Intelligence for Your Environment
BreachSpider tracks 384,000+ CVEs and matches them to your ICS/OT assets by exact version, with AI analysis, NERC CIP mapping, and vendor PSIRT contacts.
Create a free account →