Junglewise Threat Intelligence

CVE-2026-54560: Cloudreve OAuth scope enforcement bypass in JWT issuance

CVE-2026-54560 · Severity: high · CVSS 7.6 · Published 2026-07-15

Technologies: github.com/cloudreve/Cloudreve/v4 (Go), github.com/cloudreve/Cloudreve/v3 (Go), Cloudreve, github.com/cloudreve/Cloudreve (Go). Vendors: Go, Cloudreve.

Executive brief

Cloudreve, a self-hosted file management system, contains a flaw in how it handles third-party application permissions (OAuth scopes). An attacker with a low-privilege access token can bypass security restrictions to perform unauthorized actions, such as reading or modifying files, changing user settings, or accessing administrative functions if the authorizing user is an admin. This could lead to significant data exposure or unauthorized system modifications by malicious third-party apps.

Technical details

Cloudreve's OAuth implementation fails to include the 'client_id' claim in issued JWT access tokens. The application's JWT verifier only loads scopes into the request context if the 'client_id' is present; without it, the 'RequiredScopes' middleware treats the request as a non-scoped session-based token and skips all scope enforcement. An attacker with a valid OAuth token (even one with minimal 'openid' scope) can successfully call sensitive API endpoints requiring 'Files.Write', 'Admin.Write', or other high-privilege scopes. The vulnerability is rooted in 'pkg/auth/jwt.go' and 'service/oauth/oauth.go'. A patch is available in version 4.0.0-20260606015557-ed20843dc3df.

Affected products

  • Cloudreve Cloudreve >= 4.0.0-20260114075425-bc6845bd742c, < 4.0.0-20260606015557-ed20843dc3df

Timeline

  • 2026-07-08: disclosed: Initial disclosure on GitHub
  • 2026-07-20: advisory: Advisory published and updated

References

Related threats