CVE-2025-22146: Sentry Sentry's Improper Authentication On SAML Vulnerability
CRITICALCVE-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
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).
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.
pip install sentry>=25.1.0
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
CVE-2025-22146 Affected Sentry Versions
1 component(s)| 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?
Which Sentry versions are affected?
What version fixes CVE-2025-22146?
Is sentry affected?
What is the CVSS score of CVE-2025-22146?
What CWE is associated with CVE-2025-22146?
How can I check PyPI dependencies for CVE-2025-22146?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}