GHSA-hq88-5x99-x3gf is a high-severity (CVSS 7.1) CWE-863 vulnerability in github.com/cloudreve/Cloudreve/v4. O3 Security confirms whether GHSA-hq88-5x99-x3gf is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Cloudreve OAuth Admin.Read scope can update OneDrive storage policy credentials
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-hq88-5x99-x3gf.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-hq88-5x99-x3gf plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 370,894 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
github.com/cloudreve/Cloudreve/v4🐹github.com/cloudreve/Cloudreve/v3Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
Cloudreve 4.16.1 has an OAuth scope authorization bypass in the admin storage policy routes. An OAuth bearer token scoped to Admin.Read but not Admin.Write can call POST /api/v4/admin/policy/oauth/signin and update OneDrive 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.
Impact
An OAuth application that was granted only read-only admin scope can modify persistent storage backend configuration for a OneDrive policy. This can break the storage backend, replace the stored application secret and app ID, and redirect future OAuth setup for that policy to attacker-controlled application parameters. The attack crosses the intended OAuth scope boundary because Admin.Write is required for sibling storage policy mutation routes.
Reproduction
Preconditions:
- The instance has a OneDrive storage policy.
- An admin user authorizes an OAuth client for
Admin.Readbut notAdmin.Write. - The OAuth client obtains a bearer access token for that admin user.
Send the following request with that read-only admin scoped token:
POST /api/v4/admin/policy/oauth/signin HTTP/1.1
Authorization: Bearer <admin OAuth token scoped to Admin.Read only>
Content-Type: application/json
{"id":1,"secret":"attacker-secret","app_id":"attacker-app-id"}
Expected secure result: the request is rejected with an insufficient-scope error because it changes storage policy credentials.
Actual result: the request reaches AdminOdOAuthURL, and GetOauthRedirectService.GetOAuth() persists the supplied values to the storage policy.
Root cause
routers/router.go applies RequiredScopes(types.ScopeAdminRead) to the authenticated admin route group. Sibling policy mutation routes add local RequiredScopes(types.ScopeAdminWrite) guards, for example policy create, policy update, CORS creation, OAuth callback, and policy delete.
The OneDrive OAuth signin route is missing that local write-scope guard:
oauth.POST("signin",
controllers.FromJSON[adminsvc.GetOauthRedirectService](adminsvc.GetOauthRedirectParamCtx{}),
controllers.AdminOdOAuthURL,
)
The handler performs a persistent write in service/admin/policy.go:
policy.Settings.OauthRedirect = routes.MasterPolicyOAuthCallback(dep.SettingProvider().SiteURL(c)).String()
policy.SecretKey = service.Secret
policy.BucketName = service.AppID
policy, err = storagePolicyClient.Upsert(c, policy)
The request fields secret and app_id come directly from the caller.
PoC evidence
A focused scope test confirmed that a request context with only Admin.Read fails CheckScope(c, types.ScopeAdminWrite), while Admin.Write implies Admin.Read. Therefore write routes must add RequiredScopes(types.ScopeAdminWrite) explicitly. The vulnerable route does not do so, and the handler writes the policy fields shown above.
Remediation
Add middleware.RequiredScopes(types.ScopeAdminWrite) to oauth.POST("signin", ...) before the JSON handler. Consider auditing other admin test routes that perform outbound network or mail actions under only Admin.Read, but this persistent credential update should be fixed first.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/cloudreve/Cloudreve/v4 | all versions | 4.17.0 |
| 🐹Go | github.com/cloudreve/Cloudreve/v3 | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/cloudreve/Cloudreve/v4. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update github.com/cloudreve/Cloudreve/v4 to 4.17.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hq88-5x99-x3gf is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-hq88-5x99-x3gf is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-hq88-5x99-x3gf. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-hq88-5x99-x3gf in your dependencies?
O3 detects GHSA-hq88-5x99-x3gf across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.