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.
CVE-2022-23642
Score elevated to 9.0 because EPSS predicts 74% probability of exploitation within the next 30 days (top 0.6% of all CVEs). NVD baseline CVSS 8.8 retained for reference. Confidence: see factors.
- High exploitation likelihood — EPSS 74%
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 8.8
- EG Score
- 9.0(high)
- EG Risk
- 70(Track*)EG Risk 70/100SSVC: Track*
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity90% × 45%Exploitation74% × 40%Automatability0% × 15%Action: Watch closely — could escalate to Attend. - EPSS
- 99.4%
- KEV
- Not listed
Published
February 18, 2022
Last Modified
November 21, 2024
References (8)
- security-advisories@githubhttp://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html
- security-advisories@githubhttp://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html
- security-advisories@githubhttps://github.com/sourcegraph/sourcegraph/pull/30833
- security-advisories@githubhttps://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9
- af854a3a-2127-422b-91ae-364da2661108http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html
- af854a3a-2127-422b-91ae-364da2661108http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html
- af854a3a-2127-422b-91ae-364da2661108https://github.com/sourcegraph/sourcegraph/pull/30833
- af854a3a-2127-422b-91ae-364da2661108https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9
Weakness Classification(2)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 9× in last 7d / 30× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-24 14:15 UTCEPSS rescore
- 2026-07-23 02:08 UTCEG score recompute▲ 0.20
- 2026-07-22 22:55 UTCEG score recompute▼ 0.20
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-22 14:06 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-20 17:05 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-15 16:56 UTCEPSS rescore
- 2026-07-15 16:56 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-13 06:11 UTCEPSS rescore
- 2026-07-13 06:11 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-06 02:21 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-01 15:04 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
Show 37 moreShow fewer
- 2026-06-28 14:06 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-27 03:07 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-21 14:55 UTCEPSS rescore
- 2026-06-21 14:55 UTCEPSS rescore
- 2026-06-18 17:51 UTCEPSS rescore
- 2026-06-18 17:51 UTCEPSS rescore
- 2026-06-17 17:51 UTCEPSS rescore
- 2026-06-17 17:51 UTCEPSS rescore
- 2026-06-15 17:46 UTCEPSS rescore
- 2026-06-14 23:15 UTCEPSS rescore
- 2026-06-14 23:15 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-12 23:10 UTCEPSS rescore
- 2026-06-12 23:10 UTCEPSS rescore
- 2026-06-10 22:16 UTCEPSS rescore
- 2026-06-10 13:20 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-29 13:42 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-26 13:43 UTCEPSS rescore
- 2026-05-26 02:42 UTCEG score recompute
Publicly available exploits
(3 references)Working exploit code is in the public domain (1 Metasploit module) (1 GitHub PoC) (1 Exploit-DB entry). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- Exploit-DBEDB-50964First seen Jun 14, 2022
Sourcegraph Gitserver 3.36.3 - Remote Code Execution (RCE)
Open source ↗ - GitHub PoCAltelus1/CVE-2022-23642First seen Jun 10, 2022
PoC for Sourcegraph Gitserver < 3.37.0 RCE (CVE-2022-23642)
Open source ↗ - Metasploitexploit/linux/http/sourcegraph_gitserver_sshcmd✓ verifiedFirst seen Feb 18, 2022
Sourcegraph gitserver sshCommand RCE
Open source ↗
Related CVEs(same CWE)
Same CWE
10 shownCWE-94
Frequently asked(5)
What is CVE-2022-23642?
When was CVE-2022-23642 disclosed?
Is CVE-2022-23642 actively exploited?
What is the CVSS score of CVE-2022-23642?
How do I remediate CVE-2022-23642?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2022-23642
Is Your Infrastructure Affected by CVE-2022-23642?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.