/

CVE-2026-56223

Severity:

HIGH RISK

(8.7)

SSO Auth Bypass (CWE-287) in Capgo Provision-User API

CVE-2026-56223

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Account Takeover and Unauthorized Access

Severity:

HIGH RISK

(8.7)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Capgo contains an SSO account takeover flaw in its provision-user endpoint that allows attacker-controlled IdPs to merge accounts purely on email matches without validating the SSO provider domain.

An attacker with enterprise org admin rights and a malicious identity provider can forge SAML assertions containing victim email addresses, causing automatic account merges and gaining full access to victim users, organizations, and their data.

Affected context

This vulnerability appears in Capgo deployments that:

  • Use SSO/SAML-based authentication and account provisioning for enterprise organizations
  • Allow org admins to configure or control identity providers
  • Implement automatic account linking or merging based primarily on email address matches

It becomes risky when SSO assertions are accepted from IdPs without strict domain ownership checks or binding between the IdP and specific user accounts.

Exploit preconditions

  • Attack surface: Capgo provision-user endpoint used for SSO/SAML account provisioning and linking
  • Required access: Enterprise organization admin privileges plus control over, or ability to configure, a malicious or compromised identity provider
  • Trigger point: Submission of SAML assertions or SSO payloads that include email addresses matching existing Capgo user accounts
  • Why exploitation is possible: The system merges accounts solely on email match without validating that the IdP is authorized for the victim's domain or enforcing a trusted binding between IdP, organization, and user identity

Why this happens

The underlying issue is an authentication and identity validation flaw where SSO assertions are treated as trustworthy purely on the basis of email identity, rather than verifying that the identity provider is properly authorized for that user's domain and organization.

This maps to CWE-287: Improper Authentication, because the application performs incomplete checks when establishing authenticated identity and linking accounts. The provision-user endpoint embodies an insecure pattern: automatic account merging based on unverified email claims from external IdPs, without enforcing strong issuer constraints, audience restrictions, or domain-scoped ownership validation.

Potential impact

  • Attacker may take over arbitrary victim accounts whose email addresses are known
  • Attacker could gain full access to victim organizations, projects, and internal data
  • Attacker can impersonate privileged users and perform administrative actions
  • Attacker may pivot across tenants if cross-org account linking is supported
  • Compromise of audit integrity through actions executed under victim identities

General mitigation guidance

Mitigation generally focuses on strengthening identity binding and authentication checks around SSO flows and account linking.

Common defensive patterns include:

  • Enforcing a strict trust relationship between identity providers, organizations, and email domains (e.g., whitelisting IdPs per tenant and domain)
  • Validating SAML/OIDC assertions for issuer, audience, and domain ownership before provisioning or merging accounts
  • Avoiding silent auto-merge; requiring explicit, verified user consent or out-of-band confirmation for account linking
  • Using immutable internal identifiers instead of email alone for account correlation
  • Applying least-privilege principles for administrative operations related to SSO configuration and user provisioning

How teams detect issues like this

Detection often relies on a mix of design review, code analysis, and runtime monitoring:

  • Static and manual code review focused on authentication flows, particularly endpoints that handle SSO assertions and account provisioning
  • Verification that SAML/OIDC handlers enforce issuer and audience checks, and do not rely solely on email for identity correlation
  • Policy-based checks in CI/CD that flag changes introducing automatic account merging or trust expansion for identity providers
  • Runtime logging and anomaly detection for unusual patterns of account merges, especially across different domains or organizations
  • Periodic security architecture reviews of SSO onboarding and tenant/IdP configuration logic

Sources

SourceLink
github.comgithub.com/Cap-go/capgo/security/advisories/GHSA-jhjh-vp9p-54fg
vulncheck.comvulncheck.com/advisories/capgo-account-takeover-via-cross-domain-sso-email-assertion-in-provision-user

Frequently asked

questions

Exploitation is scoped to environments where an attacker has enterprise org admin control and can configure or operate a malicious identity provider. Within that scope, any account whose email is known and matches the SSO assertion may be targeted.

The attacker needs administrative access to an enterprise organization and the ability to control or configure an IdP used for SSO. They do not need direct access to the victim's original credentials; they rely instead on forged SSO assertions.

The safest pattern is to enforce strong authentication binding between IdPs, organizations, and user identities. This includes validating the IdP's authorization for specific domains, checking issuer and audience fields, and using durable internal identifiers instead of email alone when merging or provisioning accounts.

Design SSO flows with the assumption that external identity data can be forged, then require multi-factor trust checks: verify IdP ownership, enforce per-tenant IdP whitelists, avoid automatic account linking, and mandate security reviews for any changes to authentication, provisioning, or account merge logic.

Find out what's already
exploitable in your codebase.