# CVE-2022-41942: Sourcegraph vulnerable to Comand Injection via gitserver

- Severity: High 7.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.67%, higher than 86% of CVEs (2026-12-01)
- Published: 2022-11-22T00:00:00.000Z
- Modified: 2026-06-17T05:04:06.423Z
- Weaknesses: CWE-20, CWE-78
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- 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.

(As written by CVE List.)

## Affected

- sourcegraph sourcegraph: < 4.1.0; before 4.1.0

## Every score

- GitHub_M: CVSS:3.1 7.9 High `CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-pfm3-23mh-6xjp> (third-party-advisory)
- <https://github.com/sourcegraph/sourcegraph/pull/42553> (patch, third-party-advisory)

## Sources

- CVE List: [CVE-2022-41942](https://www.cve.org/CVERecord?id=CVE-2022-41942), CVE Terms of Use, modified 2025-04-23
- NVD: [CVE-2022-41942](https://nvd.nist.gov/vuln/detail/CVE-2022-41942), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-41942 · Whole record: https://cve.day/CVE-2022-41942.json · Rebuilt by cve.day 2026-11-25T22:58:16.822Z
