CVE-2026-42354
Python vulnerability analysis and mitigation

Overview

CVE-2026-42354 is a critical authentication bypass vulnerability in Sentry's SAML SSO implementation that allows an attacker to take over any user account by leveraging a malicious SAML Identity Provider (IdP). It affects Sentry versions 21.12.0 through 26.4.0 (inclusive). The vulnerability was reported via Sentry's private bug bounty program and disclosed on April 22, 2026, with the GitHub Advisory Database entry published April 30, 2026. It carries a CVSS v3.1 base score of 9.1 (Critical) per the GitHub Advisory, though Feedly's NVD-sourced data lists 9.8 (GitHub Advisory, Sentry Security Advisory).

Technical details

The root cause is classified as CWE-290 (Authentication Bypass by Spoofing). During the SAML SSO provider setup flow in src/sentry/auth/helper.py, the _finish_setup_pipeline method called handle_attach_identity using the email address asserted by the IdP rather than the email of the authenticated admin performing the setup. This meant an attacker with organization admin privileges in one organization on a multi-tenant Sentry instance could configure a malicious SAML IdP that asserts the email address of any known victim user, causing resolve_email_to_user to return the victim's account and link the attacker's SSO identity to it. The fix (commit 0c67558) overrides the IdP-asserted email with request.user.email during setup, ensuring the identity is always linked to the authenticated admin (Sentry Security Advisory, Fix Commit).

Impact

Successful exploitation grants an attacker full control over any targeted user account on the Sentry instance, including access to all projects, error data, source code integrations, and secrets associated with that account. The confidentiality and integrity impacts are both rated High, as the attacker can read sensitive application telemetry and modify Sentry configurations. For self-hosted multi-organization deployments, any user account whose email address is known can be compromised, potentially enabling lateral movement across all organizations on the instance (GitHub Advisory, Sentry Security Advisory).

Exploitability

No public proof-of-concept exploit code is known to exist, and there is no evidence of in-the-wild exploitation at this time (GitHub Advisory). The EPSS score is approximately 0.012% (2nd percentile), indicating a low near-term exploitation probability. Exploitation requires the attacker to already have organization admin-level access on a secondary organization within the same multi-organization Sentry instance, and the victim's email address must be known — limiting the attack surface. The vulnerability is not listed in the CISA KEV catalog. No threat actor attribution has been reported.

Exploitation steps

  1. Identify target: Confirm the Sentry instance is running in multi-organization mode (SENTRY_SINGLE_ORGANIZATION = False) and identify a victim user account by email address.
  2. Obtain admin access to a secondary org: The attacker must already have or acquire organization owner/admin permissions in any organization on the same Sentry instance (separate from the victim's organization).
  3. Configure a malicious SAML IdP: Set up a controlled SAML Identity Provider that will assert the victim's email address in its SAML response.
  4. Initiate SSO setup: In the attacker-controlled organization, navigate to SSO settings and begin the SAML provider setup flow, pointing it to the malicious IdP.
  5. Trigger identity linking: Complete the SAML SSO setup pipeline. The malicious IdP returns a SAML assertion with the victim's email; the vulnerable _finish_setup_pipeline method calls handle_attach_identity using the IdP-asserted email, resolving to the victim's user account and linking the attacker's SSO identity to it.
  6. Authenticate as victim: The attacker can now authenticate via the malicious SAML IdP and gain full access to the victim's Sentry account (Sentry Security Advisory, Fix Commit).

Indicators of compromise

  • Logs: Sentry audit logs showing SSO provider configuration changes in an organization, particularly where the configuring admin's email differs from the email asserted in the SAML response; unexpected AuthIdentity records linking a user to an SSO provider they did not configure.
  • Authentication Events: Login events for a user account originating from an unfamiliar SAML IdP or organization SSO flow; successful SSO authentications for accounts that do not belong to the organization where SSO was configured.
  • Configuration Changes: New or modified SSO/SAML provider settings in an organization, especially if the IdP metadata URL points to an external or unknown endpoint.
  • Account Activity: Unusual account activity (project access, API token creation, integration changes) for a user account shortly after an SSO setup event in a different organization on the same instance (Sentry Security Advisory).

Mitigation and workarounds

Sentry SaaS users require no action — the fix was deployed in April 2026. Self-hosted Sentry users should upgrade to version 26.4.1 or higher (Sentry Release 26.4.1). If upgrading is not immediately possible, self-hosted instances running in single-organization mode (SENTRY_SINGLE_ORGANIZATION = True) are not vulnerable and require no action. As a workaround for multi-organization instances, enabling user account-based two-factor authentication (2FA) prevents an attacker from completing authentication even after identity linking — users must enable this individually via Account Settings > Security, as organization administrators cannot enable it on a user's behalf (GitHub Advisory, Sentry Security Advisory).

Community reactions

The vulnerability was reported through Sentry's private bug bounty program by researcher jaydns and handled responsibly with a coordinated disclosure. Security news outlet SecurityOnline.info covered the issue, and The Hacker Wire published an article specifically on the account takeover vector (The Hacker Wire). Tenable added detection coverage via Nessus plugin 313233. Community reaction has been measured given the limited attack surface (requires existing org admin access), but the critical CVSS score drew attention from vulnerability tracking platforms including VulDB and CIRCL.

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-j659-8xh6-5pq5HIGH8.7
  • Python logoPython
  • atomic-agents-stack
NoYesAug 17, 2026
GHSA-xhcr-cqfr-m3hvHIGH8.7
  • Python logoPython
  • atomic-agents-stack
NoYesAug 17, 2026
CVE-2026-71491HIGH8.7
  • Python logoPython
  • sqlparse
NoYesAug 17, 2026
CVE-2026-68519HIGH7.1
  • Python logoPython
  • glances
NoYesAug 17, 2026
CVE-2026-68520MEDIUM5.3
  • Python logoPython
  • glances
NoYesAug 17, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management