Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @better-auth/scim
  4. ›
  5. GHSA-rjg6-39jm-rgg4

GHSA-rjg6-39jm-rgg4: @better-auth/scim: account takeover and stale access via SCIM provider-id collision

July 24, 2026

@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 →

Affected versions

All versions starting from 1.4.0-beta.27 before 1.6.22, all versions starting from 1.7.0-beta.0 before 1.7.0-beta.10

Fixed versions

  • 1.6.22
  • 1.7.0-beta.10

Solution

Upgrade to versions 1.6.22, 1.7.0-beta.10 or above.

Impact 9.9 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation
  • CWE-639: Authorization Bypass Through User-Controlled Key
  • CWE-862: Missing Authorization

Source file

npm/@better-auth/scim/GHSA-rjg6-39jm-rgg4.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:53 +0000.