VYPR
Critical severity9.1NVD Advisory· Published Jan 15, 2025· Updated Apr 15, 2026

CVE-2025-22146

CVE-2025-22146

Description

Sentry is a developer-first error tracking and performance monitoring tool. A critical vulnerability was discovered in the SAML SSO implementation of Sentry. It was reported to us via our private bug bounty program. The vulnerability allows an attacker to take over any user account by using a malicious SAML Identity Provider and another organization on the same Sentry instance. The victim email address must be known in order to exploit this vulnerability. The Sentry SaaS fix was deployed on Jan 14, 2025. For self hosted users; if only a single organization is allowed (SENTRY_SINGLE_ORGANIZATION = True), then no action is needed. Otherwise, users should upgrade to version 25.1.0 or higher. There are no known workarounds for this vulnerability.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
sentryPyPI
>= 21.12.0, < 25.1.025.1.0

Patches

2
6db508f7949d

fix: check user in helper (#83407)

https://github.com/getsentry/sentryAlexander TarasovJan 14, 2025via ghsa
2 files changed · +12 1
  • src/sentry/auth/helper.py+1 1 modified
    @@ -547,7 +547,7 @@ def handle_unknown_identity(
             elif not self._has_usable_password():
                 is_new_account = True
     
    -        if op == "confirm" and self.user.is_authenticated or is_account_verified:
    +        if op == "confirm" and (self.request.user.id == self.user.id) or is_account_verified:
                 auth_identity = self.handle_attach_identity()
             elif op == "newuser":
                 auth_identity = self.handle_new_user()
    
  • tests/sentry/web/frontend/test_auth_saml2.py+11 0 modified
    @@ -295,3 +295,14 @@ def test_logout_request(self):
     
             updated = type(self.user).objects.get(pk=self.user.id)
             assert updated.session_nonce != self.user.session_nonce
    +
    +    def test_verify_email(self, follow=False, **kwargs):
    +        assert AuthIdentity.objects.filter(user_id=self.user.id).count() == 0
    +
    +        response = self.accept_auth()
    +        assert response.status_code == 200
    +
    +        response = self.client.post(self.acs_path, {"op": "confirm"})
    +
    +        # expect no linking before verification
    +        assert AuthIdentity.objects.filter(user_id=self.user.id).count() == 0
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.