/

CVE-2026-90942

Severity:

CRITICAL RISK

(9.6)

Authorization Bypass (CWE-863) in Casdoor Certificates

CVE-2026-90942

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Cross-tenant authentication bypass and privileged identity impersonation

Severity:

CRITICAL RISK

(9.6)

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 through version 4.4.0 does not properly protect the instance-wide built-in certificate private key exposed through certificate retrieval endpoints. An organization administrator who obtains the key may be able to forge JWT tokens for users across organizations, including global administrators, creating a critical cross-tenant authorization risk.

Affected context

The issue occurs in Casdoor deployments that expose the built-in certificate through /api/get-certs or /api/get-cert and permit organization administrators to access those endpoints. Risk is higher where the returned private key is accepted for JWT signing and where tokens are trusted across organization or administrative boundaries.

Exploit preconditions

  • Attack surface: Casdoor certificate retrieval API endpoints
  • Required access: Valid organization administrator privileges, or another path to invoke the endpoints with equivalent authorization
  • Trigger point: Retrieval of the instance-wide built-in certificate private key
  • Why exploitation is possible: Insufficient authorization and masking controls allow a lower-scope administrator to obtain a signing key trusted for authentication across broader application contexts

Why this happens

The vulnerability results from failing to enforce authorization boundaries around a shared cryptographic private key. The certificate retrieval functionality exposes sensitive key material to organization administrators instead of limiting access to an appropriate instance-level security boundary or returning only non-sensitive certificate data. This maps to CWE-863: Incorrect Authorization, because a user with narrower administrative scope may access a resource whose permissions should be restricted to a more privileged context.

Potential impact

  • Attackers may forge JWT tokens for arbitrary users
  • Attackers could impersonate global administrators
  • Unauthorized access across organizations may occur
  • Tenant isolation and access-control policies could be bypassed
  • Sensitive organizational data may be exposed or modified
  • Audit records may attribute malicious activity to forged identities

General mitigation guidance

Mitigation generally focuses on protecting signing keys as high-sensitivity secrets and enforcing authorization at the correct administrative scope.

Common defensive patterns include:

  • Never returning private key material through routine API responses
  • Returning public certificate information separately from secret signing material
  • Restricting key-management operations to tightly controlled instance-level principals
  • Applying explicit organization and tenant boundary checks to certificate endpoints
  • Rotating potentially exposed signing keys and invalidating tokens issued with compromised material
  • Storing signing keys in protected secret-management systems with least-privilege access
  • Using short-lived tokens and validating issuer, audience, organization, and signature claims

How teams detect issues like this

Organizations can assess for this class of issue through:

  • Static analysis and code review of certificate, key, and token-management endpoints
  • Checks for private-key fields included in API serializers or JSON responses
  • Authorization tests using organization administrator and global administrator roles
  • Integration tests confirming that tenant-scoped users cannot retrieve instance-wide secrets
  • API gateway policies that block sensitive key-management operations from lower-trust roles
  • Monitoring responses for PEM-encoded private keys, signing secrets, or unexpected credential material

Automated security review tools can help identify secret exposure and missing authorization checks, but role-boundary tests are still important.

Sources

SourceLink
github.comgithub.com/casdoor/casdoor
github.comgithub.com/casdoor/casdoor/blob/v4.4.0/controllers/cert.go
github.comgithub.com/casdoor/casdoor/blob/v4.4.0/object/cert.go
github.comgithub.com/geo-chen/oss/blob/main/casdoor.md#finding-3-organization-admin-can-read-the-global-built-in-jwt-signing-private-key-via-apiget-certs-and-apiget-cert-incomplete-fix-of-3003--enables-cross-organization-token-forgery
vulncheck.comvulncheck.com/advisories/casdoor-through-4.4.0-private-key-exposure-via-certificate-endpoints

Frequently asked

questions

Exploitation generally requires organization administrator access or another ability to invoke the affected certificate endpoints under an equivalent authorization context.

The exposed key is instance-wide, so misuse may extend beyond the administrator's organization if the key is trusted for tokens across organizational boundaries.

Do not expose private signing keys through application APIs. Enforce instance-level authorization for key-management operations and return only non-sensitive certificate information where appropriate.

Treat signing keys as secrets, test every administrative endpoint across tenant boundaries, apply least privilege, and monitor for unexpected private-key material in API responses.

Find out what's already
exploitable in your codebase.