Twenty identity spoofing through forged SSO callbacks leading to complete administrator account takeover
An attacker can exploit a logic flaw in the SSO login callback mechanism. With SECURITY permission, the attacker configures a malicious OIDC identity provider and crafts a request containing the target administrator's email. The system only verifies email ownership and does not bind an external identity identifier or the original authentication source, so it issues a legitimate token directly. This behavior bypasses the IMPERSONATE permission check, secondary verification, and audit logging, fully taking over the accounts of any workspace member, including administrators, and severely damaging system integrity and confidentiality.
- Strictly bind SSO login to a pre-linked external identity identifier, forbid implicit association based only on a matching email, and ensure a complete authorization check and audit trail when switching identities.
