/

CVE-2026-54560

Severity:

HIGH RISK

(7.6)

Missing OAuth Scope Validation (CWE-863) in Cloudreve

CVE-2026-54560

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Privilege Escalation via Scope Bypass

Severity:

HIGH RISK

(7.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

Cloudreve incorrectly issues OAuth access tokens without a client_id claim, causing the verifier to skip loading scopes into the request context.

As a result, low-privileged OAuth tokens may be treated as fully authenticated sessions and can invoke APIs that should require higher scopes, including file, sharing, workflow, and potentially administrative actions.

Affected context

This vulnerability appears in Cloudreve deployments that:

  • Use OAuth-based authentication and authorization, and
  • Rely on token scopes to gate access to sensitive APIs

The issue is triggered when access tokens are issued without a client_id claim, leading the JWT verifier to treat the request as a non-scoped authenticated session.

In such environments, APIs that should be restricted to high-privilege scopes (e.g., file management, sharing, workflow, user settings, WebDAV accounts, admin operations) become accessible to holders of low-scope OAuth tokens under certain conditions.

Exploit preconditions

  • Attack surface: Cloudreve HTTP(S) API endpoints and web UI protected by OAuth tokens.
  • Required access: A valid OAuth access token with any scope, obtained through legitimate authorization or compromised credentials.
  • Trigger point: Submitting requests to scope-protected endpoints while presenting an access token missing the client_id claim.
  • Why exploitation is possible: The authorization layer fails to associate scopes with the token when client_id is absent, causing RequiredScopes to fall back to treating the session as fully authenticated without enforcing scope checks, effectively bypassing fine-grained authorization.

Why this happens

The root cause lies in incorrect authorization logic around OAuth token handling and scope evaluation.

Token issuance omits the client_id claim that the verifier expects to determine the context and load the correct scopes.

When this claim is missing, the JWT validation path does not populate scope information and the RequiredScopes mechanism degrades to a broader, session-like authentication model.

This maps to CWE-863: Incorrect Authorization, where access control decisions are made based on incomplete or incorrect contextual attributes, allowing operations beyond the intended permission set.

Potential impact

  • Low-scope OAuth tokens can gain access to APIs intended for higher scopes.
  • Unauthorized file management operations (upload, download, deletion, or modification) may become possible.
  • Abuse of share and workflow APIs, potentially exposing or altering shared resources.
  • Unauthorized changes to user settings and WebDAV account configurations.
  • Potential escalation to administrative actions if those endpoints are protected only by scopes.
  • Lateral movement or data exposure within a multi-user Cloudreve deployment.

General mitigation guidance

Mitigation generally focuses on hardening authorization flows and accurately binding scopes to every access token:

  • Ensure that token issuance includes all claims required by the authorization layer, especially those used to derive scopes or client context.
  • Design authorization checks so that they fail closed: if scopes cannot be resolved or validated, access to privileged endpoints should be denied by default.
  • Implement explicit, per-endpoint authorization rules that validate scope and role information rather than relying solely on session-like authentication.
  • Separate high-privilege administrative or configuration operations behind additional authorization checks, such as distinct roles or dedicated admin contexts.
  • Minimize the power of generic authenticated sessions; prefer least-privilege scopes and reduce overbroad default access.

How teams detect issues like this

Effective detection typically involves both code-level and operational techniques:

  • Code review: Look for authorization paths where missing or malformed claims cause the system to bypass scope evaluation or fall back to broad "authenticated user" logic.
  • Static analysis: Define rules to flag authorization checks that do not verify scopes or roles on sensitive endpoints, or that conditionally skip checks based on presence of specific claims.
  • Log analysis: Monitor access logs for low-privilege clients or users invoking high-risk endpoints, especially where scope evaluation logs are missing or indicate default handling.
  • Security testing: Incorporate automated tests that present tokens with partial or missing claims to ensure endpoints correctly deny access when authorization context is incomplete.

Sources

SourceLink
github.comgithub.com/cloudreve/cloudreve/commit/ed20843dc3df20a25fcaf6b538647e11c4d68d87
github.comgithub.com/cloudreve/cloudreve/releases/tag/4.16.1
github.comgithub.com/cloudreve/cloudreve/security/advisories/GHSA-vgj4-345g-jcf8

Frequently asked

questions

Yes. Any party that can obtain a valid OAuth access token and reach the Cloudreve API or web interface over the network may attempt to exploit this authorization gap.

No. A standard user or client with a low-scope OAuth token may be sufficient, as the flaw can cause the system to treat such tokens as fully authorized for certain operations.

Align token issuance and verification so all claims required for authorization are mandatory, and ensure that when claims or scopes cannot be resolved, the authorization layer denies access rather than degrading to a more permissive mode.

Treat authorization as a first-class design concern: define clear permission models, make scope and role checks explicit for sensitive endpoints, adopt "fail-closed" logic for missing context, and regularly test authorization behavior with both valid and malformed tokens.

Find out what's already
exploitable in your codebase.