Cloudreve: OAuth Admin.Read scope can update OneDrive storage policy credentials
cloudreve
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/cloudreve/Cloudreve/v4 Go |
|
|
| github.com/cloudreve/Cloudreve/v3 Go |
| No fix yet |
cloudreve
| Product | Affected | Fixed in |
|---|---|---|
| github.com/cloudreve/Cloudreve/v4 Go |
|
|
| github.com/cloudreve/Cloudreve/v3 Go |
| No fix yet |
| github.com/cloudreve/Cloudreve Go |
| No fix yet |
Cloudreve is a self-hosted file management and sharing system. Prior to 4.17.0, POST /api/v4/admin/policy/oauth/signin requires only Admin.Read even though GetOauthRedirectService persists caller-supplied OneDrive secret and app_id values, allowing an OAuth token without Admin.Write to modify storage policy credentials. The route is inside the admin group that requires Admin.Read, but it does not add the local Admin.Write guard used by sibling policy mutation routes. Its handler persists attacker-supplied secret and app_id values into the selected OneDrive storage policy before returning an OAuth URL. This issue is fixed in version 4.17.0.
From the CVE record · GitHub_M
Cloudreve’s admin OAuth sign-in endpoint can modify OneDrive storage policy credentials without the Admin.Write permission. An attacker with an OAuth token granting Admin.Read can submit secret and app_id values that are saved to a selected policy.
Operators of Cloudreve using github.com/cloudreve/Cloudreve/v4 before 4.17.0, or any version of github.com/cloudreve/Cloudreve/v3 or github.com/cloudreve/Cloudreve, should check their deployments.