CVE-2022-41942
published high CVSS 3.1 · 7.9Sourcegraph vulnerable to Comand Injection via gitserver
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| sourcegraph | — | sourcegraph< 4.1.0 | Affected | Not stated | 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.9 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| sourcegraph | sourcegraph | < 4.1.0 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-20 CWE-20: Improper Input Validation
- CWE-78 CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
References
2Provider assertions
3GitHub_M · cna
Sourcegraph vulnerable to Comand Injection via gitserver
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- d4b3a896c4030b344b01de6de12e994dd449c102cd877d328ba6a26c3ccb8a58
- Ingested
- 23 Sep 2026, 08:02:45 UTC
- Source record
- Official CVE record