Privilege escalation - Normal user can somehow make admin to delete shared folders
A normal user could cause an admin to delete a shared folder by re-sharing it back to the admin, so that when the admin unshared it, the folder was deleted entirely. The attacker could thus destroy data without the admin's knowledge.
- Triaged in 2 hours
- Fixed in 5 months
- Disclosed after 8 months
Summary by the program
@etd reported an issue to us which had already been reported to us an independent party via our public bug tracker. Thus we were not able to qualify this for a monetary reward.
However, we'd like to thank @etd for their report! – On request of the reporter, this issue is only disclosed limitedly. While we usually don't agree to disclose limited in this case the report was submitted prior to our policy change about disclosure.
The original report can be found below.
Details: Normal user can somehow make admin to delete shared folders
Scenario: Created two users: Admin user - "admin" Normal user - "test"
Steps:
-
Login as admin and create folder "sample_folder" in home and share with user "test" with settings: --> can share
-
Login as test and goto home and once again share folder "sample_folder" with admin
-
If suppose admin visits Files --> Shared with you . There he can find shared folder "sample_folder". If he unshares the folder , then the folder "sample_folder" will be deleted completely without his knowledge
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 system deleted the folder when the admin removed the share, rather than only removing the share.
Impact
A normal user could cause an admin to delete a shared folder, leading to data loss.
What the attacker needed
Two user accounts: one admin, one normal; admin shares a folder with the normal user; normal user re-shares the folder back to admin; admin unshares the folder
How it was found
- Log in as admin and create a folder in the home directory, then share it with a normal user with share permission.
- Log in as the normal user and re-share that folder back to the admin.
- As admin, go to the 'Shared with you' section and unshare the folder.
- The original folder is deleted completely.
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.
In file-sharing systems, when you share a folder with someone, they can sometimes share it back to you. Here, if a normal user shared a folder back to the admin, the admin saw it as a shared folder. When the admin removed that share, the system deleted the original folder instead of just removing the share. This let a normal user trick an admin into deleting data.
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.