What’s Vulnerable › Vulnerabilities
CVE-2022-31154: Indirect Object Access in Sourcegraph Code Monitoring
- Severity: medium (CVSS 4.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-08-01 · updated 2026-06-17
- Weakness: CWE-863
Description
Sourcegraph is an opensource code search and navigation engine. It is possible for an authenticated Sourcegraph user to edit the Code Monitors owned by any other Sourcegraph user. This includes being able to edit both the trigger and the action of the monitor in question. An attacker is not able to read contents of existing code monitors, only override the data. The issue is fixed in Sourcegraph 3.42. There are no workaround for the issue and patching is highly recommended.
Affected products
- sourcegraph: before 3.42.0 — fixed in 3.42.0
How to fix
Upgrade to a fixed version: sourcegraph 3.42.0. Check the vendor advisory for mitigations.
References
- https://github.com/sourcegraph/sourcegraph/pull/37526
- https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-5866-hhq9-9hpc
- https://github.com/sourcegraph/sourcegraph/pull/37526
- https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-5866-hhq9-9hpc
Get alerted when CVE-2022-31154 or the next vulnerability affects your stack