Admins can change authentication details of user configured external storage
An admin could change the global credentials for external storage belonging to any other user or admin by altering the uid parameter in a request.
- Triaged in 7 hours
- Fixed in 2 months
- Paid in 3 months
- Disclosed after 4 months
Summary by the program
Security advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-2448-44rp-c7hh
The report
Summary:
After some testing in nextcloud server, i found improper access control make users in admin group to change any "Global credentials" for admin/user external storage
Note* this issue affect admin to admin & admin to user.
Steps To Reproduce:
- As a malicious admin user
- Navigate to External storage
- At the global credentials input any random valid credentials for example POC:anything
- Intercept the following request
POST /nextcloud/index.php/apps/files_external/globalcredentials HTTP/1.1
Host: 192.168.56.103
Content-Length: 43
Accept: application/json, text/javascript, */*; q=0.01
requesttoken: fFwUgm3xqnKq1YBdX5pj8eskJP+6VwfEYSUkhdEbADE=:GQwn4z6nyTrCuOVtbe9Vg6pnfIf/HXezJhNU3P50bFQ=
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
OCS-APIREQUEST: true
Content-Type: application/json
Origin: http://192.168.56.103
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: oc_sessionPassphrase=B4MUb9O8t71%2BDkT%2FXpeTcrJgb5FoSTRXXKwlRJTJKQ027je%2F7KT2XbFCPs6hU4WgjzTv6iQ1GZfwvVXQ7QsiBM%2FJL5pKT8W4yj4ZU237V4yWGWCERO8hHjEYCnHSp671; nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; oc6xi9hj9sei=irdv8ml4hrgm7gg57v104tj20t; nc_username=nvz; nc_token=o4gwXiPvdr4j3Ba7glzBLoN%2FdhDu6Uvo; nc_session_id=irdv8ml4hrgm7gg57v104tj20t
Connection: close
{"uid":"nvz","user":"nvz","password":"123"}
-
Change the
uidparameter to any other user or admin -
As a result we notice the following response
true
- And by navigating to the user effected we notice the Global Credentials been changed
Supporting Material/References:
[list any additional material (e.g. screenshots, logs, etc.)]
- [attachment / reference]
Impact
users in admin group can change any "Global credentials" for admin/user external storage
Attachments



Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server trusted the uid parameter in the request without verifying that the authenticated admin was allowed to modify credentials for that specific user.
Impact
An admin could change the global credentials for any user's external storage.
What the attacker needed
Admin account
How it was found
- Log in as an admin user and go to External storage.
- Enter any valid credentials in the global credentials field.
- Intercept the request sent to the globalcredentials endpoint.
- Change the uid parameter to another user or admin.
- Observe the response returns true and the target user's global credentials are changed.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
External storage lets Nextcloud connect to other services using saved usernames and passwords. The report shows that an admin could change those saved details for any other account, not just their own, because the server did not check who the request was really for.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.