CVE-2022-31155: CWE-863: Incorrect Authorization in sourcegraph sourcegraph
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 Analysis
Technical Summary
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.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Belgium
CVE-2022-31155: CWE-863: Incorrect Authorization in sourcegraph 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
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.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
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: 7/31/2025, 4:06:03 PM
Views: 12
Related Threats
CVE-2025-8878: CWE-94 Improper Control of Generation of Code ('Code Injection') in properfraction Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress
MediumCVE-2025-8143: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pencidesign Soledad
MediumCVE-2025-8142: CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in pencidesign Soledad
HighCVE-2025-8105: CWE-94 Improper Control of Generation of Code ('Code Injection') in pencidesign Soledad
HighCVE-2025-8719: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in reubenthiessen Translate This gTranslate Shortcode
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.