← Vulnerability feed

Vulnerability record · CVE-2022-29171 · published 6 May 2022

CVE-2022-29171: Sourcegraph injection vulnerability

Sourcegraph · Sourcegraph

Sourcegraph is a fast and featureful code search and navigation engine. Versions before 3.38.0 are vulnerable to Remote Code Execution in the gitserver service. The Gitolite code host integration with Phabricator allows Sourcegraph site admins to specify a `callsignCommand`, which is used to obtain the Phabricator metadata for a Gitolite repository. An administrator who is able to edit or add a Gitolite code host and has administrative access to Sourcegraph’s bundled Grafana instance can change this command arbitrarily and run it remotely. This grants direct access to the infrastructure underlying the Sourcegraph installation. The attack requires: site-admin privileges on the instance of Sourcegraph, Administrative privileges on the bundled Grafana monitoring instance, Knowledge of the gitserver IP address or DNS name (if running in Kubernetes). This can be found through Grafana. The issue is patched in version 3.38.0. You may disable Gitolite code hosts. We still highly encourage upgrading regardless of workarounds.

7.2 CVSS 3.1 High EPSS 1.4% · top 29.5% CWE-74 · InjectionCWE-94 · Code injection
7.2CVSS 3.1 base score, v2 6.0
1.4%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
2References
17 Jun 2026Last modified by NVD

Description

Sourcegraph is a fast and featureful code search and navigation engine. Versions before 3.38.0 are vulnerable to Remote Code Execution in the gitserver service. The Gitolite code host integration with Phabricator allows Sourcegraph site admins to specify a `callsignCommand`, which is used to obtain the Phabricator metadata for a Gitolite repository. An administrator who is able to edit or add a Gitolite code host and has administrative access to Sourcegraph’s bundled Grafana instance can change this command arbitrarily and run it remotely. This grants direct access to the infrastructure underlying the Sourcegraph installation. The attack requires: site-admin privileges on the instance of Sourcegraph, Administrative privileges on the bundled Grafana monitoring instance, Knowledge of the gitserver IP address or DNS name (if running in Kubernetes). This can be found through Grafana. The issue is patched in version 3.38.0. You may disable Gitolite code hosts. We still highly encourage upgrading regardless of workarounds.

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2022-29171 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

8.8CVE-2022-23642Sourcegraph gitserver git config injection enables remote code executionSourcegraph before 3.37 fails to restrict calls to `git config` in its gitserver service, which acts as a git exec proxy. An attacker can set the `co…EPSS 74%analysed7.8CVE-2022-41942Sourcegraph improper input validation vulnerabilitySourcegraph is a code intelligence platform. In versions prior to 4.1.0 a command Injection vulnerability existed in the gitserver service, present i…EPSS 2.8%7.2CVE-2022-41943Sourcegraph incorrect default permissions vulnerabilitysourcegraph is a code intelligence platform. As a site admin it was possible to execute arbitrary commands on Gitserver when the experimental `custom…EPSS 1.8%6.5CVE-2022-23643Sourcegraph information exposure vulnerabilitySourcegraph is a code search and navigation engine. Sourcegraph versions 3.35 and 3.36 reintroduced a previously fixed side-channel vulnerabilitity i…EPSS 0.80%6.5CVE-2021-43823Sourcegraph information exposure vulnerabilitySourcegraph is a code search and navigation engine. Sourcegraph prior to version 3.33.2 is vulnerable to a side-channel attack where strings in priva…EPSS 0.84%6.1CVE-2020-12283Sourcegraph open redirect vulnerabilitySourcegraph before 3.15.1 has a vulnerable authentication workflow because of improper validation in the SafeRedirectURL method in cmd/frontend/auth/…EPSS 1.3%4.3CVE-2022-31154Sourcegraph incorrect authorization vulnerabilitySourcegraph is an opensource code search and navigation engine. It is possible for an authenticated Sourcegraph user to edit the Code Monitors owned …EPSS 0.49%4.3CVE-2022-31155Sourcegraph incorrect authorization vulnerabilitySourcegraph is an opensource code search and navigation engine. In Sourcegraph versions before 3.41.0, it is possible for an attacker to delete other…EPSS 0.49%

Source: NIST National Vulnerability Database (record CVE-2022-29171), CISA KEV, FIRST EPSS (scores of 2026-09-27). This page is refreshed as NVD updates the record.