RCE in Sourcegraph

CVE-2022-29171

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.

Published · last modified .

CVSS v3 metric

CVSS v3 base score 6.6 (Medium). Vector: CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H.

EPSS exploit prediction

EPSS: 0.014 (70.5th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 70th percentile — 70.5% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2022-29171: held from 0.013 to 0.014.

EPSS over last 30 days · oldest: 0.013 · newest: 0.014 · change: +0.001

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2022-29171?
CVE-2022-29171 is a medium-severity vulnerability in Sourcegraph, classified under Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection). CVSS score: 6.6/10. Published 2022-05-06.
How severe is CVE-2022-29171?
Medium severity. CVSS v3 base score is 6.6 out of 10.