CVE-2025-22146 Overview
A critical authentication bypass vulnerability was discovered in Sentry's SAML SSO implementation. Sentry is a widely-used developer-first error tracking and performance monitoring tool. This vulnerability allows an attacker to take over any user account by leveraging a malicious SAML Identity Provider in conjunction with another organization on the same Sentry instance. The attack requires knowledge of the victim's email address.
Critical Impact
Complete account takeover is possible through SAML authentication bypass, allowing attackers to gain unauthorized access to any user account on affected Sentry instances.
Affected Products
- Sentry self-hosted versions prior to 25.1.0
- Sentry SaaS (patched January 14, 2025)
- Sentry instances with multiple organizations enabled (SENTRY_SINGLE_ORGANIZATION = False)
Discovery Timeline
- January 14, 2025 - Sentry SaaS fix deployed
- January 15, 2025 - CVE-2025-22146 published to NVD
- January 15, 2025 - Last updated in NVD database
Technical Details for CVE-2025-22146
Vulnerability Analysis
This vulnerability is classified as CWE-287 (Improper Authentication), representing a fundamental flaw in the SAML SSO authentication flow within Sentry. The vulnerability was reported through Sentry's private bug bounty program, indicating responsible disclosure practices were followed.
The attack exploits a weakness in how Sentry validates SAML assertions across different organizations within the same instance. When multiple organizations are configured on a Sentry deployment, the SAML authentication mechanism fails to properly isolate authentication contexts between organizations. This allows an attacker who controls a malicious SAML Identity Provider for one organization to craft authentication responses that impersonate users in other organizations.
The network-accessible nature of this vulnerability combined with no required privileges or user interaction makes it particularly dangerous for multi-tenant Sentry deployments.
Root Cause
The root cause lies in improper validation of SAML assertions during the SSO authentication process. The Sentry application failed to adequately verify that the SAML Identity Provider making authentication claims was authorized for the specific organization and user being authenticated. This improper authentication (CWE-287) allows cross-organization authentication spoofing.
Attack Vector
The attack is network-based and requires the attacker to:
- Have access to create or control an organization on the target Sentry instance
- Configure a malicious SAML Identity Provider for their controlled organization
- Know the email address of the victim account they wish to compromise
- Craft SAML responses that assert the victim's identity through their malicious IdP
The vulnerability requires no user interaction from the victim and can be exploited remotely without any prior privileges on the victim's account. Due to the absence of verified code examples, readers should consult the GitHub Security Advisory for technical implementation details and the GitHub Pull Request for the specific code changes.
Detection Methods for CVE-2025-22146
Indicators of Compromise
- Unusual SAML authentication events where users authenticate via unexpected Identity Providers
- Login events where the organization context in the SAML response doesn't match the expected user organization
- Multiple failed SAML assertion validations followed by successful authentication
- User sessions initiated from SAML SSO that don't correlate with legitimate IdP logs
Detection Strategies
- Monitor SAML authentication logs for cross-organization authentication attempts
- Implement alerting on authentication events where the authenticating IdP differs from the user's primary organization
- Review audit logs for account access patterns inconsistent with normal user behavior
- Correlate Sentry authentication logs with your organization's legitimate SAML Identity Provider logs
Monitoring Recommendations
- Enable detailed SAML authentication logging in Sentry deployments
- Configure alerts for any authentication events involving newly created organizations
- Implement user behavior analytics to detect anomalous access patterns post-authentication
- Regularly audit organization and SAML IdP configurations for unauthorized changes
How to Mitigate CVE-2025-22146
Immediate Actions Required
- Upgrade self-hosted Sentry installations to version 25.1.0 or higher immediately
- Verify Sentry SaaS deployments received the January 14, 2025 automatic fix
- For single-organization deployments, confirm SENTRY_SINGLE_ORGANIZATION = True is set
- Audit user accounts for any signs of unauthorized access or suspicious authentication events
Patch Information
The vulnerability has been addressed in Sentry version 25.1.0 for self-hosted installations. Sentry SaaS was patched on January 14, 2025. The fix can be reviewed in the GitHub Pull Request #83407. For complete security advisory details, see GHSA-7pq6-v88g-wf3w.
Workarounds
- Configure SENTRY_SINGLE_ORGANIZATION = True if your deployment only requires a single organization
- There are no other known workarounds for multi-organization deployments; upgrading is required
- Consider temporarily disabling SAML SSO and using alternative authentication methods until patching is complete
- Restrict the ability to create new organizations on self-hosted instances
# Configuration example for single organization mode
# Add to your Sentry configuration file (sentry.conf.py)
SENTRY_SINGLE_ORGANIZATION = True
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

