{"id":"CVE-2022-41942","state":"PUBLISHED","title":"Sourcegraph vulnerable to Comand Injection via gitserver","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.","publishedAt":"2022-11-22T00:00:00.000Z","updatedAt":"2025-04-23T16:36:07.093Z","severity":{"score":7.9,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L","source":"GitHub_M"},"assigner":"GitHub_M","products":["sourcegraph sourcegraph"],"affected":[{"vendor":"sourcegraph","product":"sourcegraph","versions":[{"version":"< 4.1.0","status":"affected"}]}],"references":["https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-pfm3-23mh-6xjp","https://github.com/sourcegraph/sourcegraph/pull/42553"],"weaknesses":["CWE-20","CWE-78"],"ingestedAt":"2026-10-29T19:50:37.819Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/41xxx/CVE-2022-41942.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2022-41942","state":"PUBLISHED","datePublished":"2022-11-22T00:00:00.000Z","dateUpdated":"2025-04-23T16:36:07.093Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2022-09-30T00:00:00.000Z"},"containers":{"cna":{"title":"Sourcegraph vulnerable to Comand Injection via gitserver","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"sourcegraph","product":"sourcegraph","versions":[{"version":"< 4.1.0","status":"affected"}]}],"references":[{"url":"https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-pfm3-23mh-6xjp"},{"url":"https://github.com/sourcegraph/sourcegraph/pull/42553"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L","attackVector":"ADJACENT_NETWORK","attackComplexity":"HIGH","privilegesRequired":"LOW","userInteraction":"NONE","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"LOW","baseScore":7.9,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-20","type":"CWE","lang":"en","description":"CWE-20: Improper Input Validation"}]},{"descriptions":[{"cweId":"CWE-78","type":"CWE","lang":"en","description":"CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2022-11-22T00:00:00.000Z"},"source":{"advisory":"GHSA-pfm3-23mh-6xjp","discovery":"UNKNOWN"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-pfm3-23mh-6xjp","tags":["x_transferred"]},{"url":"https://github.com/sourcegraph/sourcegraph/pull/42553","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T12:56:38.632Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-04-23T15:46:32.465895Z","id":"CVE-2022-41942","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-04-23T16:36:07.093Z"}}]}}}