Skip to content
Access control Disclosed report Beginner

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.

egrep Follow

Originally disclosed on HackerOne

  • 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:

  1. Login as admin and create folder "sample_folder" in home and share with user "test" with settings: --> can share

  2. Login as test and goto home and once again share folder "sample_folder" with admin

  3. 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

The original report as published on HackerOne, by egrep. 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 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

  1. Log in as admin and create a folder in the home directory, then share it with a normal user with share permission.
  2. Log in as the normal user and re-share that folder back to the admin.
  3. As admin, go to the 'Shared with you' section and unshare the folder.
  4. 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.

More by egrep

View all

7 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.