PT-2022-3024 · Sourcegraph · Sourcegraph
Published
2022-02-10
·
Updated
2023-06-27
·
CVE-2022-23642
CVSS v3.1
8.8
High
| Vector | AV: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
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Sourcegraph