CVE-2022-23642

CVE-2022-23642 is a high-severity vulnerability in Sourcegraph with a CVSS 3.x base score of 8.8. Its EPSS exploit-prediction score of 74% places it in the 99th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-862.

Key facts

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.

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.
How severe is CVE-2022-23642?
CVE-2022-23642 has a CVSS 3.x base score of 8.8, rated high severity. It is exploitable over network with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
Is CVE-2022-23642 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 74% (99th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2022-23642?
CVE-2022-23642 affects Sourcegraph. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2022-23642?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
When was CVE-2022-23642 published?
CVE-2022-23642 was published on 2022-02-18 and last updated on 2026-06-17.

References

Affected products (1)

More vulnerabilities in Sourcegraph

All CVEs affecting Sourcegraph →

Other CWE-862 (Missing Authorization) vulnerabilities

Browse all CWE-862 (Missing Authorization) vulnerabilities →