GHSA-rjg6-39jm-rgg4: @better-auth/scim: account takeover and stale access via SCIM provider-id collision
@better-auth/scim used the same logical provider ID for SCIM provider configuration and account ownership. SCIM token issuance did not reject all account-provider namespaces. An authenticated user could therefore mint a SCIM token whose provider ID matched an existing SSO, SAML, OIDC, generic OAuth, or social provider. SCIM user routes then selected account rows by that provider ID and treated those users as SCIM-managed, even when the SCIM token had never provisioned them.
The same write path had 2 additional validation issues. First, SCIM active: false was not modeled, so identity providers could receive a successful response while the user stayed active. Second, SCIM PUT and PATCH updates changed global email addresses without the same uniqueness check used by create, and emailVerified stayed unchanged after an email reassignment.
References
- github.com/advisories/GHSA-rjg6-39jm-rgg4
- github.com/better-auth/better-auth/commit/7c126dcd1aad24468ec37e876545c1d083d8acca
- github.com/better-auth/better-auth/pull/10242
- github.com/better-auth/better-auth/releases/tag/v1.6.22
- github.com/better-auth/better-auth/releases/tag/v1.7.0-beta.10
- github.com/better-auth/better-auth/security/advisories/GHSA-rjg6-39jm-rgg4
Code Behaviors & Features
Detect and mitigate GHSA-rjg6-39jm-rgg4 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →