Skip to content

Side-channel attack in Sourcegraph Code Monitors

High
andreeleuterio published GHSA-xqv2-x6f2-w3pf Feb 15, 2022

Package

gomod Sourcegraph (Go)

Affected versions

>= 3.35 < 3.35.2, >= 3.36 < 3.36.3

Patched versions

3.35.2, >= 3.36.3

Description

Impact

Sourcegraph versions 3.35 and 3.36 reintroduced a previously fixed side-channel vulnerabilitity in the Code Monitoring feature where strings in private source code could be guessed by an authenticated but unauthorized actor. This issue affects only the Code Monitoring feature whereas the previous disclosure also affected saved searches.
A successful attack would require an authenticated bad actor to create many 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.

Patches

This issue was patched in versions 3.35.2, 3.36.3, and any future versions of Sourcegraph.

Workarounds

We strongly recommend upgrading to one of the available patched versions. If you are unable to, you may use this SQL Script to disable the Code Monitor feature in your installation.

For more information

If you have any questions or comments about this advisory:

Severity

High

CVE ID

CVE-2022-23643

Weaknesses