Nextcloud 10.0 privilege escalation issue - Normal user can mask external storage shared by admin
A non-privileged user could create an external storage folder with the same name as one an administrator had shared with a group, then share their own version with that group. When a group member opened the folder, they saw only the attacker's storage, masking the administrator's shared storage.
- Triaged in under an hour
- Fixed in 22 months
- Paid in 22 months
- Disclosed after 3.5 years
Normal user(Non-privileged) can mask external storage shared by admin.
Scenario : Created three users "admin", "attacker", "victim" Created group "samplegroup" containing all the three users with "victim" as group admin
Steps:
- User "admin" created external storage named "localstrg"(note: name is the attack vector) with properties:
Folder Name : localstrg External Storage : Local Authentication : None Configuration : / Available for : "samplegroup","admin" - groups Settings : Enable sharing
- On seeing this , user "attacker" created one more external storage with the same name "localstrg" with properties:
Folder Name : localstrg External Storage : SFTP Authentication : Username and Password Configuration : Fill "Host", "Root" ," Username" ,"Password" Settings : Enable sharing
-
After that, user "attacker" shared created external storage with group "samplegroup" which is having other two users
-
If suppose, user "victim" visits the external storage "localstrg" in his profile, he is only shown with files shared by user "attacker"
Prerequisite : Both attacker and victim should be in the same group
Using this vulnerability, non-privilged user can mask the external storage shared by admin to other users
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 application resolved external storage by its user-chosen folder name rather than a unique identifier, so a later storage with the same name shadowed the earlier one.
Impact
A non-privileged user could hide an administrator's shared external storage from group members and present their own storage under the same name instead.
What the attacker needed
Attacker and victim in the same group; attacker has a normal account; admin has shared an external storage
How it was found
- An administrator creates an external storage with a chosen folder name and shares it with a group.
- A non-privileged user creates a second external storage using the same folder name.
- That user shares their storage with the same group.
- A group member opens the folder and sees only the attacker's storage, not the administrator's.
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.
An external storage is a folder in a file-sharing app that points to files kept elsewhere. A low-privileged user could create a folder with the same name as the administrator's and have it shown instead.
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.