Skip to main content
Public proof of conceptFix available

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?

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
  1. 2022-02-1823:15CVE publishedNVD
  2. 2022-06-14Exploit-DB entryExploit-DB

Observed activity

isMalicious corpus · updated 2026-11-04 03:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block 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
Sourcegraph
BranchAffectedFixed in
3.37< 3.373.37

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.

  • sourcegraph
    Affected
    • = < 3.37no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2022-07-13

Fix

  1. Update Sourcegraph to 3.37

Advisories and patches

Detection

read 2026-11-03 22:42 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
EDB-50964
Exploit-DB
Proof-of-concept repositories
1 repository, unverifiedAltelus1/CVE-2022-23642
PoC-in-GitHub
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

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?

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.

Is CVE-2022-23642 actively exploited?

A proof-of-concept exploit exists for CVE-2022-23642, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2022-23642?

CVE-2022-23642 has a CVSS v3 base score of 8.8 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.

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

Sources for this record