Sourcegraph is a code search and navigation engine. Sourcegraph prior to version 3.37 is vulnerable to remote code execution in the…
GitHub_M·CWE-94·Published 2022-02-18
Sourcegraph is a code search and navigation engine. Sourcegraph prior to version 3.37 is vulnerable to remote code execution in the `gitserver` service. The service 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, which sets git to use the specified command instead of ssh when they need to connect to a remote system. Exploitation of this vulnerability depends on how Sourcegraph is deployed. An attacker able to make HTTP requests to internal services like gitserver is able to exploit it. This issue is patched in Sourcegraph version 3.37. As a workaround, ensure that requests to gitserver are properly protected.
Sourcegraph is a code search and navigation engine. Sourcegraph prior to version 3.37 is vulnerable to remote code execution in the `gitserver` service. The service 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, which sets git to use the specified command instead of ssh when they need to connect to a remote system. Exploitation of this vulnerability depends on how Sourcegraph is deployed. An attacker able to make HTTP requests to internal services like gitserver is able to exploit it. This issue is patched in Sourcegraph version 3.37. As a workaround, ensure that requests to gitserver are properly protected.
Sourcegraph es un motor de búsqueda y navegación de código. Sourcegraph versiones anteriores a 3.37, es vulnerable a una ejecución de código remota en el servicio "gitserver". El servicio actúa como un proxy de git exec, y no restringe apropiadamente la llamada a "git config". Esto permite a un atacante configurar la opción git "core.sshCommand", que establece que git use el comando especificado en lugar de ssh cuando necesite conectarse a un sistema remoto. Una explotación de esta vulnerabilidad depende de cómo sea desplegado Sourcegraph. Un atacante capaz de hacer peticiones HTTP a servicios internos como gitserver es capaz de explotarla. Este problema está parcheado en la versión 3.37 de Sourcegraph. Como medida de mitigación, asegúrate de que las peticiones a gitserver están correctamente protegidas
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 2.0 | Primary | NVD | 6.0 | 6.8 | 6.4 | AV:N/AC:M/Au:S/C:P/I:P/A:P |
| 3.1 | Primary | cve.org | 8.8 | — | — | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | Primary | NVD | 8.8 | 2.8 | 5.9 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | Secondary | NVD | 8.8 | 2.8 | 5.9 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |