/

CVE-2026-56215

Severity:

HIGH RISK

(8.3)

IDOR Account Linking Flaw (CWE-639) in Capgo SSO

CVE-2026-56215

Deferred

Vulnerability type

Category:

Insecure Direct Object Reference (IDOR)

CWE:

CWE-639

Impact:

Account Takeover / Unauthorized Account Linking

Severity:

HIGH RISK

(8.3)

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 authorization flaw where authenticated users can arbitrarily change the email field that is later trusted as a key for SSO account merging.

By pre-setting their email to a victim's corporate SSO address, an attacker can cause the SSO provisioning flow to merge the victim's identity into the attacker-controlled account.

Affected context

This vulnerability occurs in Capgo deployments where:

  • The public.users.email field is user-modifiable after account creation
  • The SSO provisioning endpoint uses the email value as a trusted key for identity linking or account merging
  • There is no separate, non-user-controlled identifier used to correlate SSO identities with existing accounts

Under these conditions, a user can align their mutable email field with a victim's corporate SSO email and influence how SSO provisioning resolves identity ownership.

Exploit preconditions

  • Attack surface: Application web/API interface handling profile updates and SSO provisioning
  • Required access: Valid authenticated user account on the Capgo instance
  • Trigger point: Invocation of the SSO provision-user or similar endpoint after the attacker has changed their account email to match a victim's SSO email
  • Why exploitation is possible: The system treats a user-controlled email attribute as an authoritative account-merge key without verifying that the email is bound to that user through a trusted, non-spoofable channel

Why this happens

The core issue is an authorization and object reference flaw consistent with CWE-639: Insecure Direct Object Reference (IDOR).

A sensitive linking operation (SSO account merge) relies on an attribute (public.users.email) that the user can directly manipulate.

Instead of using an internal, immutable identifier for correlation, the design trusts a mutable, user-supplied field as a secure reference, enabling attackers to impersonate or absorb other identities during SSO provisioning.

Potential impact

  • Attackers could gain unauthorized access to data and capabilities associated with a victim's SSO identity.
  • SSO-linked accounts could be merged into attacker-controlled profiles, effectively enabling account takeover.
  • Access control policies based on email domain or SSO groups could be bypassed.
  • Audit trails and identity records can become unreliable due to misattributed account merges.

General mitigation guidance

Mitigation typically focuses on separating user-controlled attributes from authoritative identity keys and enforcing strong ownership verification.

Useful defensive patterns include:

  • Using immutable, server-assigned identifiers (e.g., internal user IDs, SSO subject/issuer pairs) as the sole basis for SSO account linking and merging.
  • Treating email and similar attributes as display or contact information, not as trust anchors for identity resolution.
  • Requiring proof-of-control (e.g., verified email flows or SSO assertions) before accepting changes to any attribute used in authorization or account linking logic.
  • Restricting updates to sensitive fields and recording changes through auditable, policy-checked flows instead of generic profile updates.

How teams detect issues like this

Detection generally involves both code-level and behavior-level analysis:

  • Static and manual code review to identify places where user-controlled fields (email, username, external IDs) are used as keys for account linking, merging, or authorization decisions.
  • Policy checks in CI/CD pipelines that flag usage of mutable profile attributes in SSO or identity correlation logic.
  • Runtime monitoring for anomalous patterns, such as frequent profile email changes followed by SSO provisioning events.
  • Use of automated security testing tools that simulate IDOR scenarios, especially around identity and SSO workflows.

Sources

SourceLink
github.comgithub.com/Cap-go/capgo/security/advisories/GHSA-wqc6-fhwf-qpww
vulncheck.comvulncheck.com/advisories/capgo-account-merge-via-poisoned-public-users-email-in-sso-provisioning

Frequently asked

questions

Yes. Any user who can create and log into an account on the affected Capgo instance and access SSO provisioning flows over the network can attempt to exploit the issue.

No elevated roles are required; exploitation only needs a standard authenticated account with the ability to edit the email field and access SSO provisioning.

Use immutable, non-user-controlled identifiers (such as SSO subject and issuer values or internal user IDs) for account linking and merging, and decouple these from mutable profile attributes like email.

Establish design guidelines that prohibit using user-editable fields as trust anchors for identity, implement explicit ownership verification for sensitive attribute changes, and include focused reviews of SSO and account-linking logic during security assessments.

Find out what's already
exploitable in your codebase.