Skip to content
Fencer Vulns
high 8.8

CVE-2022-23642 in the critical feed json

Code Injection in Sourcegraph

published 2022-02-18 4 y ago modified 2026-06-17 4 mo ago also EUVD-2022-28590

cvss
8.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
74.3%
EPSS 74.3% chance of exploitation in 30 days, percentile 99.4%
public exploits
2
Metasploit, Exploit-DB

Summary

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.

Patch / fix

Timeline

  1. First public exploit (Metasploit exploit/linux/http/sourcegraph_gitserver_sshcmd)
  2. Published

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
total
Assessed
18 mo ago

Exploit prediction

74.31% chance of exploitation in the next 30 days, higher than 99.4% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

CVSS scores

assigned by version score vector
CNA 3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 6.0 AV:N/AC:M/Au:S/C:P/I:P/A:P

Affected products

  • sourcegraph sourcegraph

Classification

Weakness
  • CWE-94 Improper Control of Generation of Code
  • CWE-862 Missing Authorization

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.