CVE-2022-41942 Sourcegraph vulnerable to Comand Injection via gitserver
Attackers with local access can execute arbitrary commands in Sourcegraph gitserver containers due to insufficient input validation.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2022-41942?
CVE-2022-41942 is a high-severity command injection vulnerability in sourcegraph, published on 22 Nov 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Which versions are affected by CVE-2022-41942?
It affects 1 product.
Products include Sourcegraph Sourcegraph.
How do I fix CVE-2022-41942?
No fix has been published for CVE-2022-41942 yet. Limit exposure of the affected software until one is available.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2022-41942 being exploited?
There is no known exploitation of CVE-2022-41942 in the wild and no public exploit code.