// For flags

CVE-2022-41942

Sourcegraph vulnerable to Comand Injection via gitserver

Severity Score

7.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

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.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Adjacent
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
Low
Attack Vector
Local
Attack Complexity
Low
Authentication
Single
Confidentiality
Complete
Integrity
Complete
Availability
Complete
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-09-30 CVE Reserved
  • 2022-11-22 CVE Published
  • 2024-08-03 CVE Updated
  • 2024-12-17 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-20: Improper Input Validation
  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Sourcegraph
Search vendor "Sourcegraph"
Sourcegraph
Search vendor "Sourcegraph" for product "Sourcegraph"
< 4.1.0
Search vendor "Sourcegraph" for product "Sourcegraph" and version " < 4.1.0"
-
Affected