A remote code execution vulnerability exists in Sourcegraph prior to version 3.37, specifically in the gitserver service. The vulnerability arises because gitserver, acting as a git exec proxy, does not properly restrict the use of 'git config', allowing an attacker to set the 'core.sshCommand' option. This enables the execution of arbitrary commands when git attempts to connect to a remote system, as git will use the attacker-specified command instead of ssh. The vulnerability is exploitable by any attacker able to make HTTP requests to internal gitserver services.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).
This repository contains a single Metasploit module (modules/exploits/linux/http/sourcegraph_gitserver_sshcmd.rb) targeting CVE-2022-23642, a remote code execution vulnerability in Sourcegraph's gitserver component. The exploit leverages the ability to set the 'core.sshCommand' git configuration value via the gitserver's HTTP API, which can then be triggered to execute arbitrary OS commands when a git push operation is performed. The module supports both direct command execution and staged payloads (using curl or wget), and can automatically enumerate available repositories or use a user-supplied one. The main attack vector is network-based, requiring access to the gitserver's HTTP API (default port 3178). The module interacts with the '/exec' and '/list' API endpoints to perform its actions. The exploit is operational and provides remote code execution as the user running the gitserver process. Protections were introduced in Sourcegraph version 3.37.0 via a feature flag, so only unpatched or misconfigured instances are vulnerable.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.