Skip to main content

@better-auth/scim CVE-2026-67330

| EUVDEUVD-2026-51859 CRITICAL
Improper Input Validation (CWE-20)
2026-08-01 VulnCheck GHSA-6mwf-73fj-3358
9.4
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as low-privileged user
  2. Delivery
    Generate SCIM token with colliding provider ID
  3. Exploit
    SCIM route resolves foreign account rows
  4. Execution
    Rewrite email or DELETE user and sessions
  5. Impact
    Account takeover and unauthorized deprovisioning

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

The application must register the @better-auth/scim plugin and permit authenticated users to generate SCIM tokens (the default canGenerateToken policy is vulnerable). The token-only paths - global email rewrite via PUT/PATCH and account/session deletion via DELETE /scim/v2/Users/:id for a non-organization token - require nothing beyond the SCIM plugin and a valid SCIM bearer token held by a low-privileged authenticated user. The additional cross-namespace account-takeover-by-collision path further requires that SSO, SAML, OIDC, generic OAuth, or social providers exist with custom provider IDs and that account rows already exist under those IDs. Limiting factors: exploitation needs an authenticated account (PR:L, not anonymous), and custom policies that already reject reused provider IDs neutralize the collision vector though not the token-only issues; only the listed version ranges are affected.

Impact

The reporter-supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N with all vulnerable- and subsequent-system impacts High) scores 9.4 (Critical), consistent with a network-reachable, low-complexity flaw needing only a low-privileged authenticated account. The most severe path - DELETE and email-rewrite against global users - requires only the SCIM plugin plus a valid SCIM token, so AC is genuinely low; the full cross-namespace collision variant additionally depends on pre-existing custom-provider-ID account rows, which raises complexity for that specific sub-path. No EPSS score, KEV listing, POC, or SSVC data was provided, so probabilistic exploitation signals are absent - this is a high-confidence design flaw with detailed public root-cause analysis but no confirmed in-the-wild activity. Net: a real priority for anyone running the SCIM plugin with user-generatable tokens, driven by impact and low barrier rather than by evidence of mass exploitation.

Exploit ScenarioDerived

An attacker holding (or self-registering) an ordinary authenticated account on an app using @better-auth/scim mints a SCIM bearer token choosing a provider ID that matches an existing SSO/OIDC provider namespace. Using that token against /scim/v2/Users, they enumerate real users, rewrite a target's email to one they control (bypassing the uniqueness check) for account takeover, or issue DELETE to wipe the victim's user record and sessions. No public POC is currently identified, but the vendor's detailed root-cause description makes the request sequence readily reproducible.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 01, 2026

Privilege-escalating account takeover in the @better-auth/scim plugin (versions 1.4.0-beta.27 through 1.6.21 and 1.7.0-beta.0 through 1.7.0-beta.9) lets an authenticated low-privileged user mint a SCIM bearer token whose provider ID collides with an existing SSO, SAML, OIDC, generic OAuth, or social provider namespace, causing SCIM user routes to operate on global accounts the token never provisioned. Attackers can list, read, rewrite (email/profile with no uniqueness check), and delete arbitrary Better Auth users and sessions, yielding full account takeover and unauthorized deprovisioning. No public exploit is identified at time of analysis and it is not in CISA KEV, but the vendor's detailed root-cause writeup makes exploitation straightforward once the plugin is enabled.

RemediationAI

Vendor-released patch: upgrade to @better-auth/scim 1.6.22 (for the 1.4.x-1.6.x line) or 1.7.0-beta.10 / 1.7.0-rc.0 (for the 1.7 pre-release line); the fix is in PR https://github.com/better-auth/better-auth/pull/10242 and commit 7c126dcd1aad24468ec37e876545c1d083d8acca. If you cannot upgrade immediately, tighten the canGenerateToken policy to reject any provider ID that already exists in your SSO/SAML/OIDC/generic OAuth or social provider tables, which closes the collision path but does not stop the token-only deprovisioning and email-rewrite issues. As a stronger stopgap, disable SCIM token generation for regular authenticated users (restrict issuance to trusted admins) or unregister the SCIM plugin entirely until patched - the trade-off is loss of self-service and automated identity-provider provisioning during the outage. Refer to the advisory at https://github.com/better-auth/better-auth/security/advisories/GHSA-rjg6-39jm-rgg4 for exact guidance.

Affected VersionsENISA

scim 1.4.0-beta.27 <*
scim 1.7.0-beta.0 <*

Affected Packages

npm @better-auth/scim fix: 1.6.22, 1.7.0-beta.10

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SCIM (System for Cross-domain Identity Management) is a REST-based provisioning protocol identity providers use to create, update, and delete accounts in downstream applications. Better Auth is a TypeScript authentication framework, and @better-auth/scim adds SCIM v2 endpoints to it. The root cause maps to CWE-20 (Improper Input Validation): the SCIM bearer middleware decoded a provider ID from the token and used that same logical provider ID both to load the scimProvider configuration row and to query ordinary account rows via account.providerId. Because token issuance did not reject provider IDs already claimed by other account-provider namespaces (SSO/SAML/OIDC/OAuth/social), the provider ID became a user-controlled authorization key. The affected package is npm @better-auth/scim (cpe:2.3:a:better-auth:scim:*), with two compounding write-path defects: SCIM active:false was not modeled (deprovisioning could silently no-op) and PUT/PATCH updates changed global email addresses without the create path's uniqueness check while leaving emailVerified stale.

Know when Scim gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 9.4 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
vuln.today AI 9.9 CRITICAL

Network-reachable REST endpoints with a low-privileged authenticated token (PR:L) and low complexity for the token-only delete/email paths; scope changes (S:C) because the SCIM plugin manipulates the broader user-account authority, with full CIA impact from read, takeover, and deletion.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

DescriptionCVE.org

@better-auth/scim (a better-auth plugin) versions >= 1.4.0-beta.27 through <= 1.6.21 and >= 1.7.0-beta.0 through <= 1.7.0-beta.9 contain an authorization bypass. SCIM token issuance did not reject provider IDs already used by existing SSO, SAML, OIDC, generic OAuth, or social account providers, and the same logical provider ID was used for both SCIM provider configuration and account ownership. An authenticated user could mint a SCIM token whose provider ID collided with an existing provider namespace, causing SCIM user routes to resolve account rows the token never provisioned. This allowed listing, reading, updating (including rewriting global profile/email fields without uniqueness checks), and deleting global user accounts and sessions, resulting in account takeover and unauthorized deprovisioning. Fixed in 1.6.22 and 1.7.0-beta.10 (1.7.0-rc.0).

Executive ViewAI

Why It Matters

The @better-auth/scim plugin (versions 1.4.0-beta.27-1.7.0-beta.9) contains a critical vulnerability allowing authenticated users to forge bearer tokens that hijack privileged accounts and bypass access controls. Attackers can read, modify, and delete any user account and session in the platform, resulting in complete account takeover and unauthorized data access. No vendor patch is available, forcing immediate mitigation actions to prevent credential compromise.

Business Impact: Severe
Compensating Controls

Disable the SCIM plugin if not operationally required. If SCIM provisioning is critical, implement: (1) strict network segmentation restricting SCIM API access to trusted provisioning hosts only, (2) comprehensive audit logging of all SCIM operations with real-time alerts for token generation and privilege-escalation patterns, (3) immediate rotation of all existing SCIM bearer tokens, and (4) segregation of low-privileged user accounts to limit attackers' ability to mint malicious tokens.

Threat Intelligence Overview

EPSS Score
0.4%
Top 72% exploitable
Prevalence
Low
niche SCIM add-on for a growing but non-ubiquitous auth library
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +47
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy