<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Cloudreve - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/cloudreve/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Mon, 20 Jul 2026 21:19:53 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/cloudreve/feed.xml" rel="self" type="application/rss+xml"/><item><title>Cloudreve OAuth Access Token Scope Bypass Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-07-cloudreve-oauth-scope-bypass/</link><pubDate>Mon, 20 Jul 2026 21:19:53 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-cloudreve-oauth-scope-bypass/</guid><description>Cloudreve's OAuth implementation contains a vulnerability, CVE-2026-54560, where OAuth access tokens bypass intended scope enforcement due to a missing `client_id` claim, allowing an attacker with a low-scope token to access sensitive APIs requiring higher privileges, effectively leading to privilege escalation.</description><content:encoded><![CDATA[<p>A high-severity vulnerability, CVE-2026-54560, has been identified in Cloudreve versions <code>&gt;= 4.0.0-20260114075425-bc6845bd742c</code> and <code>&lt; 4.0.0-20260606015557-ed20843dc3df</code>, which allows OAuth access tokens to bypass intended scope enforcement. This flaw occurs because OAuth access tokens are issued without the <code>client_id</code> claim. Consequently, Cloudreve's JWT verifier fails to load the specified scopes into the request context. The <code>RequiredScopes(...)</code> middleware then incorrectly treats these requests as non-scoped, session-based authentications, effectively skipping all scope checks. This enables an attacker, holding a legitimate but low-scope OAuth access token (e.g., granted only <code>openid</code>), to access sensitive APIs that normally require higher privileges, such as file management, sharing, workflow controls, user settings, WebDAV account management, and potentially even administrative functions if the authorizing user possesses administrative rights. This vulnerability represents a significant privilege escalation risk for affected Cloudreve deployments.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker creates or utilizes an existing third-party OAuth client configured with a minimal scope, such as <code>openid</code>.</li>
<li>The attacker convinces a legitimate Cloudreve user to authorize this OAuth application for the specified low-privilege scope.</li>
<li>Upon user authorization, Cloudreve issues an authorization code to the OAuth application.</li>
<li>The attacker's OAuth application exchanges this authorization code for an access token by sending a <code>POST</code> request to <code>/api/v4/session/oauth/token</code>.</li>
<li>Cloudreve's <code>Issue(...)</code> function generates the access token, embedding the requested scopes but inadvertently omitting the <code>ClientID</code> claim in the JWT payload.</li>
<li>The attacker uses this compromised access token as a bearer token (<code>Authorization: Bearer &lt;access_token&gt;</code>) to authenticate subsequent API requests.</li>
<li>When an API request arrives, Cloudreve's JWT verifier attempts to load scopes into the request context. However, because the access token lacks the <code>ClientID</code> claim, the scopes are not loaded.</li>
<li>The <code>RequiredScopes(...)</code> middleware, designed to enforce API access based on scopes, proceeds to check for scopes in the request context. Finding none (due to the missing <code>ClientID</code>), it incorrectly skips scope enforcement entirely, treating the request as a non-scoped session-based authentication.</li>
<li>As a result, API calls requiring higher scopes (e.g., <code>Files.Read/Write</code>, <code>Shares.Read/Write</code>, <code>UserInfo.Write</code>, <code>DavAccount.Write</code>, or even <code>Admin.Read/Write</code>) are processed and executed successfully under the authorizing user's identity, bypassing the intended OAuth scope restrictions.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability does not enable anonymous authentication bypass but allows for a critical OAuth consent and scope boundary bypass. An attacker leveraging this flaw requires a valid OAuth access token for a real user, albeit one initially granted minimal permissions (e.g., <code>openid</code>). Once obtained, this low-privilege token can be illicitly used to perform actions typically restricted to much higher scopes on behalf of the user. For regular users, this could lead to unauthorized access, modification, or deletion of files, shares, workflows, user settings, and WebDAV account/device configurations. If the authorizing user possesses administrative privileges, the same flaw can be exploited to access and manipulate administrator-scoped functionality without the OAuth application ever being explicitly granted <code>Admin.Read</code> or <code>Admin.Write</code> scopes, leading to severe unauthorized administrative control.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Patch Cloudreve installations immediately to a version that addresses CVE-2026-54560, specifically versions equal to or greater than <code>4.0.0-20260606015557-ed20843dc3df</code>.</li>
<li>Monitor application logs and API gateway logs for unusual access patterns by OAuth tokens, particularly calls to sensitive endpoints (<code>Files</code>, <code>Shares</code>, <code>Workflow</code>, <code>User</code>, <code>DavAccount</code>, <code>Admin</code> APIs) made by tokens initially granted minimal scopes.</li>
<li>Implement API gateway or proxy-level checks to validate OAuth scopes against API endpoint requirements, ensuring a fail-closed approach for all OAuth token-based requests.</li>
<li>Regularly audit all registered OAuth clients within Cloudreve, reviewing their granted permissions and their necessity.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>oauth</category><category>vulnerability</category><category>privilege-escalation</category><category>cloudreve</category><category>web-application</category></item></channel></rss>