/

CVE-2026-91998

Severity:

CRITICAL RISK

(9.9)

Authorization Bypass (CWE-863) in Casdoor MCP API Endpoint

CVE-2026-91998

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Cross-organization unauthorized access and account administration

Severity:

CRITICAL RISK

(9.9)

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

Casdoor contains an authorization bypass in the /api/mcp endpoint that can let a user with valid client credentials from one application access user administration across other organizations. Depending on deployment permissions, an attacker may enumerate sensitive user data, create administrator accounts, alter users, or delete accounts without the required organization-level authorization.

Affected context

The issue affects Casdoor deployments where the /api/mcp endpoint accepts a valid application's clientId and clientSecret but does not correctly enforce organization or resource-level authorization. The risk is greatest when application credentials are exposed to untrusted users, broadly distributed, or permitted to invoke user-management operations beyond their owning application's organization.

Exploit preconditions

  • Attack surface: The network-accessible /api/mcp endpoint
  • Required access: A valid clientId and clientSecret for any application, or access to credentials that can be used by the attacker
  • Trigger point: Requests to user-administration operations through the MCP endpoint
  • Why exploitation is possible: Authentication of the application credential is not sufficiently matched with organization-level authorization for the requested user-management action

Why this happens

The vulnerability is an authorization enforcement failure mapped to CWE-863: Incorrect Authorization. The endpoint appears to treat valid application authentication as sufficient authority for operations affecting users in other organizations, rather than independently verifying tenant ownership, resource scope, and administrative privileges for each request. This insecure pattern allows an authenticated principal to cross an authorization boundary.

Potential impact

  • Attackers may enumerate user records across organizations
  • Password salts and email addresses could be exposed
  • Unauthorized administrator accounts may be created
  • Existing users may be modified or deleted
  • Organizations may experience account takeover or administrative lockout
  • Sensitive identity data may be used for follow-on attacks

General mitigation guidance

Mitigation generally focuses on enforcing authorization independently of authentication at every user-management operation.

Common defensive patterns include:

  • Binding application credentials to an explicit organization and narrowly defined operation scopes
  • Performing server-side tenant, resource-ownership, and role checks for every request
  • Applying deny-by-default authorization policies for administrative actions
  • Avoiding reliance on client-supplied organization identifiers or roles
  • Limiting application credential distribution and protecting secrets from end users
  • Reducing administrative privileges and separating read, write, create, and delete permissions
  • Minimizing sensitive fields returned by user-enumeration APIs
  • Logging and reviewing cross-organization access attempts

How teams detect issues like this

Detection can combine static analysis, authorization-focused code review, and runtime monitoring.

Useful approaches include:

  • Reviewing endpoint handlers for missing tenant, ownership, role, or scope checks
  • Searching for authorization decisions based solely on successful client authentication
  • Testing each administrative operation with credentials from a different organization
  • Adding policy tests that verify cross-tenant reads and writes are denied by default
  • Monitoring audit logs for unusual enumeration, administrator creation, bulk modification, or deletion activity
  • Enforcing centralized authorization policies and automated security checks in CI pipelines

Sources

SourceLink
github.comgithub.com/casdoor/casdoor
github.comgithub.com/casdoor/casdoor/blob/v4.4.0/authz/authz.go#L174-L176
github.comgithub.com/casdoor/casdoor/blob/v4.4.0/mcpself/user.go
github.comgithub.com/casdoor/casdoor/blob/v4.4.0/routers/base.go#L122-L154
github.comgithub.com/geo-chen/oss/blob/main/casdoor.md#finding-2-application-credential-authorization-bypass-in-apimcp-enables-unrestricted-cross-organization-user-administration
vulncheck.comvulncheck.com/advisories/casdoor-through-4.4.0-cross-organization-user-administration-via-api-mcp

Frequently asked

questions

It may be remotely exploitable when the /api/mcp endpoint is reachable by an attacker and a valid application's client credentials can be obtained or misused.

The attacker generally needs a legitimate clientId and clientSecret belonging to any application. The credentials do not necessarily need to belong to the target organization if tenant authorization is missing.

Enforce server-side, deny-by-default authorization for every operation, including organization ownership, resource scope, and administrative role checks.

Use centralized policy enforcement, narrowly scoped application credentials, cross-tenant authorization tests, least privilege, and audit monitoring for administrative API activity.

Find out what's already
exploitable in your codebase.