CVE-2025-22146: Sentry Sentry's Improper Authentication On SAML Vulnerability

CRITICAL
Advisory Identifier: GHSA-7pq6-v88g-wf3w
CVSS 9.1
CWE-287
Published
Advisory Summary

CVE-2025-22146 is a CRITICAL (CVSS 9.1) sentry's improper authentication on saml vulnerability (CWE-287: Improper Authentication) affecting Sentry libraries in the PyPI ecosystem. The issue involves sentry's improper authentication on saml sso process allows user impersonation. Remediation is available by upgrading affected packages to version 25.1.0.

CVE-2025-22146 at a Glance

CVE Identifier CVE-2025-22146
GHSA Identifier GHSA-7pq6-v88g-wf3w
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-287: Improper Authentication
Affected Product Sentry
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2025-22146

To remediate this vulnerability, upgrade all affected Sentry dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

sentry fixed: 25.1.0
pip install sentry>=25.1.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show sentry

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-22146, inspect your installed packages using pip:

pip show sentry

Analyze the terminal output to locate any version of Sentry in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 25.1.0), your application is affected.

Note: The pip show sentry command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Sentry, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact 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. ### Patches - [Sentry SaaS](https://sentry.io): The fix was deployed on Jan 14, 2025. - [Self-Hosted Sentry](https://github.com/getsentry/self-hosted): 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. ### Workarounds No known workarounds. ### References - https://github.com/getsentry/sentry/pull/83407

CVE-2025-22146 Affected Sentry Versions

1 component(s)
Fixed Versions:
25.1.0
Product / Package Ecosystem Affected Versions Fixed Version
sentry
PyPI
≥ 21.12.0
< 25.1.0
25.1.0

References

Frequently Asked Questions

What is CVE-2025-22146?
CVE-2025-22146 is a security vulnerability in Sentry involving Sentry's improper authentication on SAML SSO process allows user impersonation under CWE-287: Improper Authentication.
Which Sentry versions are affected?
Affected versions include releases prior to 25.1.0 across affected packages: sentry.
What version fixes CVE-2025-22146?
Upgrading to 25.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sentry affected?
Yes, sentry is affected in releases prior to 25.1.0. Upgrade your dependency to 25.1.0 or later.
What is the CVSS score of CVE-2025-22146?
CVE-2025-22146 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2025-22146?
CVE-2025-22146 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check PyPI dependencies for CVE-2025-22146?
Run the dependency tree command: 'pip show sentry'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7pq6-v88g-wf3w",
  "modified" : "2025-01-15T22:01:20Z",
  "published" : "2025-01-15T21:25:27Z",
  "aliases" : [ "CVE-2025-22146" ],
  "summary" : "Sentry's improper authentication on SAML SSO process allows user impersonation",
  "details" : "### Impact\nA critical vulnerability was discovered in the SAML SSO implementation of Sentry. It was reported to us via our private bug bounty program.\n\nThe 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.\n\n### Patches\n- [Sentry SaaS](https://sentry.io): The fix was deployed on Jan 14, 2025.\n- [Self-Hosted Sentry](https://github.com/getsentry/self-hosted): 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.\n\n### Workarounds\nNo known workarounds.\n\n### References\n- https://github.com/getsentry/sentry/pull/83407",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "sentry"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "21.12.0"
      }, {
        "fixed" : "25.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry/security/advisories/GHSA-7pq6-v88g-wf3w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-22146"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry/pull/83407"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry/commit/6db508f7949d117c7dff748a3c82c3a272bf7cfd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/getsentry/sentry"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-15T21:25:27Z",
    "nvd_published_at" : "2025-01-15T20:15:30Z"
  }
}