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

Source: https://junglewise.ai/threats/cve-2026-54560-cloudreve-oauth-scope-enforcement-bypass-in-jwt-issuance  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-15. Updated: 2026-07-20  
License: CC BY 4.0 with a link back

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

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.

Technologies: [Cloudreve](https://junglewise.ai/threats/technologies/cloudreve), [github.com/cloudreve/Cloudreve (Go)](https://junglewise.ai/threats/technologies/github-com-cloudreve-cloudreve), [github.com/cloudreve/Cloudreve/v3 (Go)](https://junglewise.ai/threats/technologies/github-com-cloudreve-cloudreve-v3), [github.com/cloudreve/Cloudreve/v4 (Go)](https://junglewise.ai/threats/technologies/github-com-cloudreve-cloudreve-v4). Vendors: [Cloudreve](https://junglewise.ai/threats/vendors/cloudreve), [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2026-54560 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-54560 being exploited in the wild.

**How severe is CVE-2026-54560?** High severity, with a CVSS score of 7.6, published 15 July 2026.

**Which products and versions are affected?** Cloudreve >= 4.0.0-20260114075425-bc6845bd742c, < 4.0.0-20260606015557-ed20843dc3df, >= 4.12.0, < 4.16.1; github.com/cloudreve/Cloudreve (Go) SEMVER:introduced=0; github.com/cloudreve/Cloudreve/v3 (Go) SEMVER:introduced=0; github.com/cloudreve/Cloudreve/v4 (Go) >= 4.0.0-20260114075425-bc6845bd742c, < 4.0.0-20260606015557-ed20843dc3df, SEMVER:introduced=4.0.0-20260114075425-bc6845bd742c,fixed=4.0.0-20260606015557-ed20843dc3df.

**Is there a fix for CVE-2026-54560?** Yes. github.com/cloudreve/Cloudreve/v4 (Go): upgrade to 4.0.0-20260606015557-ed20843dc3df or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-54560 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-54560?** Check whether you run Cloudreve, github.com/cloudreve/Cloudreve (Go), github.com/cloudreve/Cloudreve/v3 (Go) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/cloudreve/Cloudreve/v4 (Go): upgrade to 4.0.0-20260606015557-ed20843dc3df or later

  ```sh
  go get github.com/cloudreve/Cloudreve/v4@v4.0.0-20260606015557-ed20843dc3df
  ```


## 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

## Identifiers

- CVE-2026-54560
- GHSA-vgj4-345g-jcf8
- GO-2026-6022

## Timeline

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

## References

- [https://api.github.com/users/EaEa0001](https://api.github.com/users/EaEa0001)
- [https://github.com/EaEa0001](https://github.com/EaEa0001)
- [https://api.github.com/users/EaEa0001/gists%7B/gist_id%7D](https://api.github.com/users/EaEa0001/gists%7B/gist_id%7D)
- [https://api.github.com/users/EaEa0001/repos](https://api.github.com/users/EaEa0001/repos)
- [https://avatars.githubusercontent.com/u/42531682?v=4](https://avatars.githubusercontent.com/u/42531682?v=4)
- [https://api.github.com/users/EaEa0001/events%7B/privacy%7D](https://api.github.com/users/EaEa0001/events%7B/privacy%7D)

## Related threats

- [Cloudreve access control bypass in share validation](https://junglewise.ai/threats/cve-2026-101056-cloudreve-before-4-16-1-fails-to-revalidate-share-access-when)
- [Cloudreve authorization bypass in admin node test endpoints](https://junglewise.ai/threats/cve-2026-101048-cloudreve-before-4-17-0-registers-the-administrative-node-test)
- [Cloudreve SSRF guard bypass via IPv6 transition wrappers](https://junglewise.ai/threats/cve-2026-79913-cloudreve-ssrf-guard-bypass-via-ipv6-transition-wrappers)
- [Cloudreve privilege scope bypass in admin API endpoints](https://junglewise.ai/threats/cve-2026-77637-cloudreve-privilege-scope-bypass-in-admin-api-endpoints)
- [Cloudreve TOCTOU race in storage-quota check and charge](https://junglewise.ai/threats/cve-2026-77633-cloudreve-toctou-race-in-storage-quota-check-and-charge)
