github.com/sourcegraph/sourcegraph is vulnerable to command injection. The vulnerability exist in the `listRepos` function in `list_gitolite.go` due to lack of input validation on the host parameter where the attacker uses a crafted request to execute commands inside the container.
{"cve": [{"lastseen": "2023-02-09T14:44:58", "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.", "cvss3": {"exploitabilityScore": 1.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "baseScore": 7.8, "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "NONE"}, "impactScore": 5.9}, "published": "2022-11-22T19:15:00", "type": "cve", "title": "CVE-2022-41942", "cwe": ["CWE-78", "CWE-20"], "bulletinFamily": "NVD", "cvss2": {}, "cvelist": ["CVE-2022-41942"], "modified": "2022-11-26T03:30:00", "cpe": [], "id": "CVE-2022-41942", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2022-41942", "cvss": {"score": 0.0, "vector": "NONE"}, "cpe23": []}]}