Read the docs
TI-2022-11715 Aliases CVE-2022-29171

Remote Code Execution in sourcegraph

Priority LOW 36CWE-74Published · Updated

Key facts

Attack vector
Network
Privileges required
High
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA. Impact type from CWE-94.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01353 71st percentileScored 2026-11-07
Fix Fixed sourcegraph (sourcegraph): 3.38.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
sourcegraphsourcegraphbefore 3.38.03.38.0Patch availableCNA
  • sourcegraph Vendorsourcegraph Affected before 3.38.0 Fixed in 3.38.0 Patch available CNA

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:sourcegraph:sourcegraph:*:*:*:*:*:*:*:*before 3.38.0Vulnerablesourcegraph
  • cpe:2.3:a:sourcegraph:sourcegraph:*:*:*:*:*:*:*:* Versions before 3.38.0 Vulnerable ·sourcegraph

Remediation

  • Fix · CNA sourcegraph (sourcegraph) Fixed in 3.38.0

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-29171

References

  • TI-2022-07694 Code Injection in Sourcegraph CVSS 3.1HIGH 8.8
  • TI-2022-20284 Incorrect default permissions found in Sourcegraph CVSS 3.1CRITICAL 9.0
  • TI-2022-20283 Sourcegraph vulnerable to Comand Injection via gitserver CVSS 3.1HIGH 7.9
  • TI-2022-07695 Side-channel attack in Sourcegraph Code Monitors CVSS 3.1MEDIUM 6.5
  • TI-2021-19629 Side-channel attack in Sourcegraph CVSS 3.1MEDIUM 6.5
  • TI-2020-09815 Sourcegraph before 3.15.1 has a vulnerable authentication workflow because of improper… CVSS 3.1MEDIUM 6.1
See all 9 →

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences