Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2022-31155: CWE-863: Incorrect Authorization in sourcegraph sourcegraph

0
Medium
Published: Mon Aug 01 2022 (08/01/2022, 18:40:28 UTC)
Source: CVE
Vendor/Project: sourcegraph
Product: sourcegraph

Description

Sourcegraph is an opensource code search and navigation engine. In Sourcegraph versions before 3.41.0, it is possible for an attacker to delete other users’ saved searches due to a bug in the authorization check. The vulnerability does not allow the reading of other users’ saved searches, only overwriting them with attacker-controlled searches. The issue is patched in Sourcegraph version 3.41.0. There is no workaround for this issue and updating to a secure version is highly recommended.

AI-Powered Analysis

AILast updated: 06/23/2025, 01:34:57 UTC

Technical Analysis

CVE-2022-31155 is a medium-severity vulnerability classified under CWE-863 (Incorrect Authorization) affecting Sourcegraph, an open-source code search and navigation engine widely used by development teams to improve code discovery and collaboration. The vulnerability exists in Sourcegraph versions prior to 3.41.0 and allows an authenticated attacker to delete or overwrite other users’ saved searches due to improper authorization checks. Specifically, while the attacker cannot read or exfiltrate other users’ saved searches, they can replace them with attacker-controlled search queries. This could disrupt the workflow of affected users by corrupting or removing their saved search configurations. The vulnerability does not allow privilege escalation beyond the ability to modify saved searches, nor does it impact the confidentiality of the saved search data. The issue was patched in Sourcegraph version 3.41.0, and no workaround exists other than upgrading to the fixed version. There are no known exploits in the wild as of the published date, and exploitation requires the attacker to be authenticated within the Sourcegraph instance, limiting the attack surface to internal or compromised users. The vulnerability impacts the integrity of saved search data but does not affect availability or confidentiality directly. Given the nature of Sourcegraph as a developer tool, the impact is primarily on user productivity and trust in the integrity of saved search configurations rather than on critical system operations or sensitive data exposure.

Potential Impact

For European organizations, the impact of CVE-2022-31155 is primarily operational and reputational within software development teams using Sourcegraph. The ability for an attacker to overwrite saved searches could lead to confusion, loss of productivity, and potential disruption in development workflows, especially in large teams relying heavily on saved searches for code navigation and review. While this vulnerability does not expose sensitive data or allow privilege escalation, it could be leveraged as part of a broader attack chain to sow distrust or cause minor sabotage within development environments. Organizations with strict compliance or audit requirements might find this vulnerability problematic if it undermines the integrity of development processes. The lack of data exfiltration risk reduces the threat to confidentiality, but the integrity compromise could affect code quality assurance and developer efficiency. Since exploitation requires authentication, the threat is more relevant to insider threats or attackers who have already gained some level of access. European organizations with mature DevOps practices and reliance on Sourcegraph should prioritize patching to maintain development environment integrity.

Mitigation Recommendations

The only effective mitigation for CVE-2022-31155 is to upgrade Sourcegraph to version 3.41.0 or later, where the authorization bug has been fixed. Organizations should implement strict access controls and monitor user activities within Sourcegraph to detect any unauthorized modifications to saved searches. Limiting Sourcegraph access to trusted users and integrating it with centralized authentication and authorization systems (e.g., SSO with role-based access control) can reduce the risk of exploitation. Additionally, organizations should audit saved search configurations regularly and maintain backups or version control of critical saved searches if possible. Since no workaround exists, patching is critical. Security teams should also educate developers about the risk of insider threats and ensure that compromised credentials are promptly revoked. Monitoring logs for unusual saved search modifications can help detect exploitation attempts early. Finally, organizations should keep Sourcegraph and related developer tools up to date to avoid similar authorization issues.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-05-18T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9844c4522896dcbf38b8

Added to database: 5/21/2025, 9:09:24 AM

Last enriched: 6/23/2025, 1:34:57 AM

Last updated: 2/2/2026, 8:45:33 AM

Views: 38

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Related Threats

CVE-2026-20422: CWE-617 Reachable Assertion in MediaTek, Inc. MT2735, MT2737, MT6813, MT6815, MT6833, MT6835, MT6853, MT6855, MT6858, MT6873, MT6875, MT6877, MT6878, MT6879, MT6880, MT6883, MT6885, MT6886, MT6889, MT6890, MT6891, MT6893, MT6895, MT6896, MT6897, MT6899, MT6980, MT6983, MT6985, MT6986, MT6989, MT6990, MT6991, MT6993, MT8668, MT8673, MT8675, MT8676, MT8678, MT8755, MT8771, MT8775, MT8791, MT8791T, MT8792, MT8793, MT8795T, MT8797, MT8798, MT8863, MT8873, MT8883, MT8893

High
VulnerabilityMon Feb 02 2026

CVE-2026-20421: CWE-125 Out-of-bounds Read in MediaTek, Inc. MT2735, MT6833, MT6853, MT6855, MT6873, MT6875, MT6877, MT6880, MT6883, MT6885, MT6889, MT6890, MT6891, MT6893, MT8791

High
VulnerabilityMon Feb 02 2026

CVE-2026-20420: CWE-125 Out-of-bounds Read in MediaTek, Inc. MT2735, MT2737, MT6813, MT6815, MT6833, MT6835, MT6853, MT6855, MT6858, MT6873, MT6875, MT6877, MT6878, MT6879, MT6880, MT6883, MT6885, MT6886, MT6889, MT6890, MT6891, MT6893, MT6895, MT6896, MT6897, MT6899, MT6980, MT6983, MT6985, MT6986, MT6989, MT6990, MT6991, MT6993, MT8676, MT8791

High
VulnerabilityMon Feb 02 2026

CVE-2026-20419: CWE-754 Improper Check for Unusual or Exceptional Conditions in MediaTek, Inc. MT6890, MT6989TB, MT7902, MT7915, MT7916, MT7920, MT7921, MT7922, MT7925, MT7927, MT7981, MT7986, MT8196, MT8668, MT8676, MT8678, MT8775, MT8791T, MT8792, MT8793, MT8796, MT8873, MT8883, MT8893, MT8910

High
VulnerabilityMon Feb 02 2026

CVE-2026-20418: CWE-787 Out-of-bounds Write in MediaTek, Inc. MT7931, MT7933

Unknown
VulnerabilityMon Feb 02 2026

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats