Skip to content
Access control Disclosed report Intermediate CVE-2023-48303

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.

st0nzy Follow

Originally disclosed on HackerOne

Bounty$100 Low 2.4 View original
  • 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 uid parameter 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]

https://docs.nextcloud.com/server/27/admin_manual/configuration_files/external_storage_configuration_gui.html#storage-configuration

Impact

users in admin group can change any "Global credentials" for admin/user external storage

Attachments

users-groups.jpg
users-groups.jpg From the original on HackerOne
externalstorage.png
externalstorage.png
full-image.JPG
full-image.JPG

The original report as published on HackerOne, by st0nzy. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

  1. Log in as an admin user and go to External storage.
  2. Enter any valid credentials in the global credentials field.
  3. Intercept the request sent to the globalcredentials endpoint.
  4. Change the uid parameter to another user or admin.
  5. 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.

More by st0nzy

View all

2 more disclosed reports, best first.

More from Nextcloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.