Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

Cloudreve: OAuth access tokens bypass scope enforcement due to missing client_id claim

CVSS 3.1 7.6 HIGHEUVD CVSS 3.1 7.6 CVSS 3.1 · [email protected] · Secondary 7.6 HIGHCVSS_V3 Publisher rating HIGHFixed by github.com/cloudreve/Cloudreve/v4 4.0.0-20260606015557-ed20843dc3dfosv · severity unknownFixed by github.com/cloudreve/Cloudreve/v4 4.0.0-20260606015557-ed20843dc3dfKEV status unknown

cve-program · CVE-2026-54560

Published

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and RequiredScopes treats the request like non-scoped session authentication, allowing a low-scope OAuth access token to call APIs requiring higher scopes such as file, share, workflow, user setting, WebDAV account, and potentially admin scopes. This issue is fixed in version 4.16.1.

Read the publisher's advisory

euvd · EUVD-2026-44689

Published

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and RequiredScopes treats the request like non-scoped session authentication, allowing a low-scope OAuth access token to call APIs requiring higher scopes such as file, share, workflow, user setting, WebDAV account, and potentially admin scopes. This issue is fixed in version 4.16.1.

Read the publisher's advisory

nvd · CVE-2026-54560

Published

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and RequiredScopes treats the request like non-scoped session authentication, allowing a low-scope OAuth access token to call APIs requiring higher scopes such as file, share, workflow, user setting, WebDAV account, and potentially admin scopes. This issue is fixed in version 4.16.1.

Read the publisher's advisory

osv · GHSA-vgj4-345g-jcf8

Published

## Summary Cloudreve's OAuth access tokens can bypass OAuth scope enforcement. This does not appear to be the intended design. The documentation describes OAuth client permissions/scopes, the API has an insufficient-scope error code, and the code comments say `RequiredScopes(...)` should verify scopes when a token has scopes, while skipping checks only for non-scoped session-based authentication. However, OAuth access tokens are issued without the OAuth `client_id` claim. Later, the JWT verifier only loads scopes into the request context when `claims.ClientID != ""`. Because the OAuth access token has no `client_id`, its scopes are not loaded, and `RequiredScopes(...)` treats the request like a non-scoped first-party/session token and skips scope checks. As a result, a low-scope OAuth access token, for example one granted only `openid`, can call APIs requiring higher scopes such as file, share, workflow, user setting, WebDAV account, and potentially admin scopes when the authorizing user is an administrator. ## Why this seems unintended Cloudreve appears to have an explicit OAuth scope model: 1. The official docs describe OAuth client permissions/scopes and require the authorization request to include requested scopes. 2. The API error code list includes an OAuth insufficient-scope error. 3. `RequiredScopes(...)` is used across sensitive API groups such as files, shares, workflows, user settings, WebDAV devices, and admin APIs. 4. The middleware comment says scope checks are skipped only when `hasScopes` is false, for example session-based authentication. 5. Default OAuth clients created during migration explicitly list scopes such as `Files.Write`, `Workflow.Write`, and `Shares.Write`. This suggests the intended design is: - First-party/session tokens may be non-scoped and skip OAuth scope checks. - OAuth access tokens should carry scope metadata and be checked against `RequiredScopes(...)`. The current implementation makes OAuth access tokens fall into the first category by mistake. ## Affected code In the OAuth authorization code exchange, Cloudreve passes both `ClientID` and `Scopes` into token issuance: ```go token, err := tokenAuth.Issue(c, &auth.IssueTokenArgs{ User: user, ClientID: s.ClientID, Scopes: authCode.Scopes, RefreshTTLOverride: refreshTTLOverride, }) Location: - service/oauth/oauth.go In Issue(...), the access token includes Scopes but does not include ClientID: accessToken, err := jwt.NewWithClaims(jwt.SigningMethodHS256, Claims{ TokenType: TokenTypeAccess, RegisteredClaims: jwt.RegisteredClaims{ Subject: uidEncoded, NotBefore: jwt.NewNumericDate(issueDate), ExpiresAt: jwt.NewNumericDate(accessTokenExpired), }, Scopes: args.Scopes, }).SignedString(t.secret) By contrast, the refresh token does include both: Scopes: args.Scopes, ClientID: args.ClientID, Location: - pkg/auth/jwt.go During request authentication, scopes are only inserted into request context if ClientID is present: if claims.ClientID != "" { util.WithValue(c, ScopeContextKey{}, claims.Scopes) } Location: - pkg/auth/jwt.go Then CheckScope(...) skips scope enforcement if no scopes are present in context: hasScopes, tokenScopes := GetScopesFromContext(c) if !hasScopes { return nil } Location: - pkg/auth/jwt.go RequiredScopes(...) relies on this check: if err := auth.CheckScope(c, requiredScopes...); err != nil { c.JSON(200, serializer.Err(c, err)) c.Abort() return } Location: - middleware/auth.go Sensitive route groups protected by RequiredScopes(...) include: - Files: Files.Read / Files.Write - Shares: Shares.Read / Shares.Write - Workflows: Workflow.Read / Workflow.Write - User settings and security info - WebDAV device/account management - Admin APIs: Admin.Read / Admin.Write Location: - routers/router.go ## Reproduction steps 1. Create or use an OAuth client with a low-privilege scope, for example only openid. 2. Complete the OAuth authorization code flow for a normal user with: scope=openid 3. Exchange the authorization code via: POST /api/v4/session/oauth/token 4. Decode the returned access token. Expected token metadata should preserve enough OAuth client/scope context for later enforcement. Actual behavior: - The access token contains the requested scopes. - The access token does not contain client_id. 5. Use the returned token as a bearer token: Authorization: Bearer <access_token> 6. Call an API that requires a scope not granted to the OAuth app, for example an endpoint requiring Files.Read, Files.Write, UserInfo.Write, or DavAccount.Write. Expected result: - The request should fail with an insufficient-scope error. Actual result: - The scope check is skipped because no scopes were inserted into the request context. - The request is processed as that user. If the authorizing user is an administrator, the same issue can affect admin APIs requiring Admin.Read or Admin.Write, because the request still runs as the admin user and the admin identity check can pass while the OAuth scope check is skipped. ## Impact This is not an anonymous authentication bypass. The attacker still needs a valid OAuth access token for a real user. The impact is an OAuth consent/scope boundary bypass: - A third-party OAuth app can request a minimal scope such as openid. - After the user authorizes it, the app receives an access token. - That token can be used as a broader bearer token for the same user's Cloudreve account, despite not being granted the required scopes. For normal users, this may allow access to or modification of files, shares, workflows, user settings, and WebDAV account/device settings depending on available APIs. For administrator users, it may allow access to admin-scoped functionality without the OAuth app being granted Admin.Read or Admin.Write. ## Suggested fix 1. Include ClientID: args.ClientID in access token claims when issuing OAuth access tokens: accessToken, err := jwt.NewWithClaims(jwt.SigningMethodHS256, Claims{ TokenType: TokenTypeAccess, RegisteredClaims: jwt.RegisteredClaims{ Subject: uidEncoded, NotBefore: jwt.NewNumericDate(issueDate), ExpiresAt: jwt.NewNumericDate(accessTokenExpired), }, Scopes: args.Scopes, ClientID: args.ClientID, }).SignedString(t.secret) 2. Consider making scope handling fail closed for OAuth tokens with malformed or inconsistent OAuth metadata. 3. Add regression tests for an OAuth access token granted only openid attempting to call APIs requiring: - Files.Read - Files.Write - UserInfo.Write - DavAccount.Write - Admin.Read - Admin.Write Each should fail with an insufficient-scope error unless the corresponding scope was granted.

Read the publisher's advisory

osv · GO-2026-6022

Published

Cloudreve: OAuth access tokens bypass scope enforcement due to missing client_id claim in github.com/cloudreve/Cloudreve

Read the publisher's advisory

Affected versions, risk and source history

Exploitation and risk

Source status

CISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.

Which CVEs have scores here?

This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.

No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.

Risk history

Compare earlier KEV listings and EPSS scores. Advisory wording and affected versions have a separate history.

When does an EPSS score appear as a change?

A prediction change is reported when EPSS rises from below 10% to 10% or higher. Every daily score change from the last 30 days stays in this history. Before that, it keeps KEV changes and moves between EPSS bands (0.1%, 1%, 5%, 10%, 20%, 50% and 90%).

Advisory history

18 saved versions

See how the publisher's advisory changed over time. Each link opens the version saved at that time. The publisher's update date can differ from the date shown here.

How advisory history works

Each link identifies one complete publisher record. History can include advisories that previously shared an identifier; an identifier removed by a publisher no longer establishes a current relationship. A historical link shows only that record and earlier saved versions. Failed checks and unchanged reads do not create new versions.

23 Nov 2026 17:30:48 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

21 Nov 2026 17:19:04 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

19 Nov 2026 16:50:09 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

17 Nov 2026 16:33:18 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

15 Nov 2026 15:49:08 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

13 Nov 2026 15:01:45 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

11 Nov 2026 14:00:40 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

9 Nov 2026 13:07:45 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

7 Nov 2026 12:30:12 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

5 Nov 2026 11:42:21 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

3 Nov 2026 11:01:54 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

1 Nov 2026 10:07:41 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

30 Oct 2026 09:51:54 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

28 Oct 2026 08:08:55 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

euvd · EUVD-2026-44689 · Published

25 Oct 2026 13:17:28 UTC

Cloudreve is a self-hosted file management and sharing system. From 4.12.0 until 4.16.1, Cloudreve's OAuth access tokens are issued without the OAuth client_id claim, so the JWT verifier does not load token scopes into request context and R…

nvd · CVE-2026-54560 · Published

24 Oct 2026 13:19:41 UTC

Cloudreve: OAuth access tokens bypass scope enforcement due to missing client_id claim

osv · GHSA-vgj4-345g-jcf8 · Published

24 Oct 2026 13:19:41 UTC

Cloudreve: OAuth access tokens bypass scope enforcement due to missing client_id claim in github.com/cloudreve/Cloudreve

osv · GO-2026-6022 · Published

23 Oct 2026 15:48:27 UTC

Cloudreve: OAuth access tokens bypass scope enforcement due to missing client_id claim

cve-program · CVE-2026-54560 · Published

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 24 Nov 08:43 UTC · 274 of 275 readable · 272 fully read · documentation 469/469 current