High severity · published Nov 22, 2022
CVE-2022-41942
Sourcegraph vulnerable to Comand Injection via gitserver
7.8
CVSS
2.8%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
Local
Complexity
Low
Privileges
Low
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)2.8% · higher than 87% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
SO
sourcegraph · sourcegraph
< 4.1.0 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2022-41942
CVE.org
https://www.cve.org/CVERecord?id=CVE-2022-41942
Patch
https://github.com/sourcegraph/sourcegraph/pull/42553
Third Party Advisory
https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-pfm3-23mh-6xjp
More from sourcegraph
8.8
CVE-2022-23642
Code Injection in Sourcegraph
7.2
CVE-2022-41943
Incorrect default permissions found in Sourcegraph
7.2
CVE-2022-29171
Remote Code Execution in sourcegraph
6.5
CVE-2022-23643
Side-channel attack in Sourcegraph Code Monitors
6.5
CVE-2021-43823
Side-channel attack in Sourcegraph
