CVE-2022-23642

Summary

CVECVE-2022-23642
StatePUBLIC
Assigner[email protected]
Source PriorityCVE Program / NVD first with legacy fallback
Published2022-02-18 23:15:00 UTC
Updated2023-06-27 19:01:00 UTC
DescriptionSourcegraph 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.

Risk And Classification

Problem Types: CWE-862

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Sourcegraph Sourcegraph All All All All

References

ReferenceSourceLinkTags
gitserver: Only allow acceptable commands and POST method in /exec by indradhanush · Pull Request #30833 · sourcegraph/sourcegraph · GitHub MISC github.com
Remote Code Execution in gitserver · Advisory · sourcegraph/sourcegraph · GitHub CONFIRM github.com
Sourcegraph Gitserver 3.36.3 Remote Code Execution ≈ Packet Storm MISC packetstormsecurity.com
Sourcegraph gitserver sshCommand Remote Command Execution ≈ Packet Storm MISC packetstormsecurity.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report