7.9high
Sourcegraph vulnerable to Comand Injection via gitserver
- Severity
- 7.9high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 2.67% (higher than 86% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
Sourcegraph is a code intelligence platform. In versions prior to 4.1.0 a command Injection vulnerability existed in the gitserver service, present in all Sourcegraph deployments. This vulnerability was caused by a lack of input validation on the host parameter of the `/list-gitolite` endpoint. It was possible to send a crafted request to gitserver that would execute commands inside the container. Successful exploitation requires the ability to send local requests to gitserver. The issue is patched in version 4.1.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| sourcegraph sourcegraph | < 4.1.0, before 4.1.0 | CVE List, NVD |
All scores
| GitHub_M | 7.9high CVSS:3.1 | CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L |
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
Sourcegraph is a code intelligence platform. In versions prior to 4.1.0 a command Injection vulnerability existed in the gitserver service, present in all Sourcegraph deployments. This vulnerability was caused by a lack of input validation on the host parameter of the `/list-gitolite` endpoint. It was possible to send a crafted request to gitserver that would execute commands inside the container. Successful exploitation requires the ability to send local requests to gitserver. The issue is patched in version 4.1.0.
NVD (es)
Sourcegraph es una plataforma de inteligencia de código. En versiones anteriores a la 4.1.0 existía una vulnerabilidad de inyección de comandos en el servicio gitserver, presente en todas las implementaciones de Sourcegraph. Esta vulnerabilidad fue causada por una falta de validación de entrada en el parámetro de host del endpoint `/list-gitolite`. Era posible enviar una solicitud manipulada a gitserver que ejecutaría comandos dentro del contenedor. La explotación exitosa requiere la capacidad de enviar solicitudes locales a gitserver. El problema se solucionó en la versión 4.1.0.
References
| https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-pfm3-23mh-6xjp | third-party-advisory | |
| https://github.com/sourcegraph/sourcegraph/pull/42553 | patch, third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-41942 changed 2025-04-23 | CVE Terms of Use |
| NVD | CVE-2022-41942 changed 2026-06-17 | Public domain |