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
- Severity: High (CVSS 3.x base score 8.8)
- CVSS v2: 6.0
- EPSS exploit prediction: 74% (99th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-862
- Affected product: Sourcegraph
- Published:
- Last modified:
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
- http://packetstormsecurity.com/files/167506/Sourcegraph-Gitserver-3.36.3-Remote-Code-Execution.html
- http://packetstormsecurity.com/files/167741/Sourcegraph-gitserver-sshCommand-Remote-Command-Execution.html
- https://github.com/sourcegraph/sourcegraph/pull/30833
- https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9
Affected products (1)
- cpe:2.3:a:sourcegraph:sourcegraph:*:*:*:*:*:*:*:*
More vulnerabilities in Sourcegraph
- CVE-2022-41943 — Critical (CVSS 9.0): sourcegraph is a code intelligence platform. As a site admin it was possible to execute arbitrary commands on Gitserver…
- CVE-2022-41942 — High (CVSS 7.9): Sourcegraph is a code intelligence platform. In versions prior to 4.1.0 a command Injection vulnerability existed in…
- CVE-2022-29171 — Medium (CVSS 6.6): Sourcegraph is a fast and featureful code search and navigation engine. Versions before 3.38.0 are vulnerable to Remote…
- CVE-2022-23643 — Medium (CVSS 6.5): Sourcegraph is a code search and navigation engine. Sourcegraph versions 3.35 and 3.36 reintroduced a previously fixed…
- CVE-2021-43823 — Medium (CVSS 6.5): Sourcegraph is a code search and navigation engine. Sourcegraph prior to version 3.33.2 is vulnerable to a side-channel…
- CVE-2022-31154 — Medium (CVSS 6.4): Sourcegraph is an opensource code search and navigation engine. It is possible for an authenticated Sourcegraph user to…
All CVEs affecting Sourcegraph →
Other CWE-862 (Missing Authorization) vulnerabilities
- CVE-2026-0092 — Critical (CVSS 10.0): In Package Manager, there is a possible device lock controller bypass due to a missing permission check. This could…
- CVE-2026-33712 — Critical (CVSS 10.0): Typebot is a chatbot builder tool. In versions 3.15.2 and prior, the preview chat endpoint (POST…
- CVE-2026-2031 — Critical (CVSS 10.0): An Improper Access Control vulnerability in several internal API endpoints for Google Cloud Application Integration…
- CVE-2026-34976 — Critical (CVSS 10.0): Dgraph is an open source distributed GraphQL database. Prior to 25.3.1, the restoreTenant admin mutation is missing…
- CVE-2025-30416 — Critical (CVSS 10.0): Sensitive data disclosure and manipulation due to missing authorization. The following products are affected: Acronis…
- CVE-2025-45854 — Critical (CVSS 10.0): /server/executeExec of JEHC-BPM 2.0.1 allows attackers to execute arbitrary code via execParams.
Browse all CWE-862 (Missing Authorization) vulnerabilities →