CVE-2022-41942
What it is
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.
At a glance
- Exploitability
- Can be exploited from the same network segment with a low-privilege account. High risk of data exposure, data tampering.
- Exploit odds
- 2.8% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 2.8% in the next 30 days (EPSS).
- Severity: 7.9 HIGH (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 2.8% · EPSS, next 30 days
- Weakness
- CWE-20 · Improper input validation
- Record status
- Modified
Affected
- Sourcegraph < 4.1.0
Attack profile CVSS 3.1 · 7.9
- Attack vector
- Adjacent network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- Low
Raw vector
CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2022-41942.md and follow it. Check whether this project is affected by CVE-2022-41942. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/sourcegraph/sourcegraph/pull/42553
- https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-pfm3-23mh-6xjp
- https://github.com/sourcegraph/sourcegraph/pull/42553
- https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-pfm3-23mh-6xjp