PT-2022-3024 · Sourcegraph · Sourcegraph

Published

2022-02-10

·

Updated

2023-06-27

·

CVE-2022-23642

CVSS v3.1

8.8

High

VectorAV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions Sourcegraph versions prior to 3.37
Description The issue is related to the gitserver service in Sourcegraph, which acts as a git exec proxy and fails to properly restrict calling git config. This allows an attacker to set the git core.sshCommand option, enabling them to execute arbitrary code by making HTTP requests to internal services like gitserver. The exploitation depends on how Sourcegraph is deployed.
Recommendations For versions prior to 3.37, update to version 3.37 to resolve the issue. As a temporary workaround, ensure that requests to gitserver are properly protected.

Exploit

Fix

Missing Authorization

Code Injection

Weakness Enumeration

Related Identifiers

BDU:2022-03690
CVE-2022-23642
GHSA-QCMP-FX72-Q8Q9

Affected Products

Sourcegraph