Skip to content
Heist/ feed
LowFix available

Cloudreve: Privilege Scope Bypass: State-Mutating Admin Operations Accessible via Read-Only OAuth Scope

Type: advisorySource: OSV1 source record

### Summary There is a privilege scope bypass in Cloudreve's admin API where two endpoints that mutate server state are missing the write-scope enforcement that their neighboring endpoints correctly apply. Specifically, the WOPI configuration fetch endpoint and the SMTP test/mail endpoint can both be triggered by an OAuth token that only has Admin.Read authorization — no Admin.Write needed. This breaks the intended OAuth scope boundary in a way that's subtle enough to have slipped through but meaningful enough to matter in a real deployment. ### Details The root cause is an inconsistency in how the admin tool routes are wired up in `routers/router.go`. The admin route group sets a baseline of `ScopeAdminRead` for everything underneath it (around line 868), and most write-capable endpoints inside the `tool` sub-group correctly layer on an additional `RequiredScopes(types.ScopeAdminWrite)` check on top of that. For example, the thumbnail executable setter (line 929) and the entity URL cache deletion (line 937) both do this properly. The two endpoints that don't follow this pattern are `tool.GET('wopi')` (line 925) and `tool.POST('mail')` (line 933). Despite `POST /mail` clearly triggering an outbound email and `GET /wopi` fetching or probing WOPI service connectivity, neither has the `ScopeAdminWrite` guard. What that means in practice is that any OAuth application granted only Admin.Read — a scope that should be limited to inspecting configuration, not changing anything — can

Announced Source revision 1
Original source ↗

GHSA-w89x-c962-c44g

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:GHSA-w89x-c962-c44g

github.com/cloudreve/Cloudreve/v4

Source reference: /affected/0/package/name

Affected versions
Not stated in this record
Fixed versions
4.0.0-20260715070110-bce08f88e9d8

Source reference: /affected/0/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "SEMVER",
        "events": [
          {
            "introduced": "0"
          },
          {
            "fixed": "4.0.0-20260715070110-bce08f88e9d8"
          }
        ]
      }
    ],
    "package": {
      "name": "github.com/cloudreve/Cloudreve/v4",
      "purl": "pkg:golang/github.com/cloudreve/Cloudreve/v4",
      "ecosystem": "Go"
    },
    "database_specific": {
      "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-w89x-c962-c44g/GHSA-w89x-c962-c44g.json"
    }
  }
]
Related CVEs
CVE-2026-77637

Source reference: /aliases

Publisher severity

low

Source reference: /database_specific/severity

Event
#63983 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement