CVE-2022-41942
JSON

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 packageVersionsReported by
sourcegraph sourcegraph< 4.1.0, before 4.1.0CVE List, NVD

All scores

GitHub_M7.9high CVSS:3.1CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-20CWE-78

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

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

Sources

SourceRecordLicence
CVE ListCVE-2022-41942 changed 2025-04-23CVE Terms of Use
NVDCVE-2022-41942 changed 2026-06-17Public domain