# CVE-2022-29171: Remote Code Execution in sourcegraph

- Severity: Medium 6.6 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.35%, higher than 72% of CVEs (2026-12-01)
- Published: 2022-05-05T23:25:09.000Z
- Modified: 2026-06-17T04:39:44.313Z
- Weaknesses: CWE-74, CWE-94
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- sourcegraph sourcegraph: < 3.38.0; before 3.38.0

## Every score

- GitHub_M: CVSS:3.1 6.6 Medium `CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.0 Medium `AV:N/AC:M/Au:S/C:P/I:P/A:P`

## References

- <https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-r2m9-hfg8-4c38> (third-party-advisory)

## Sources

- CVE List: [CVE-2022-29171](https://www.cve.org/CVERecord?id=CVE-2022-29171), CVE Terms of Use, modified 2025-04-23
- NVD: [CVE-2022-29171](https://nvd.nist.gov/vuln/detail/CVE-2022-29171), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-29171 · Whole record: https://cve.day/CVE-2022-29171.json · Rebuilt by cve.day 2026-11-25T22:58:11.489Z
