Skip to content
Access control Disclosed report Intermediate

Share owner has no possibility to list all existing derived shares

A shared link created by a group member for a single file continued to work after the folder owner removed the group's sharing privilege, and the link then behaved as a link to the whole folder. This let anyone holding that link see all files in the folder, not just the one file originally shared.

detroitsmash Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 6 months
  • Paid in 3 days
  • Disclosed after 6 months

Hi,

I found a bug where a shared link of particular file can disclose all files of that folder.

###Steps to reproduce

  • Make a group( http://*/nextcloud/index.php/settings/users) and a standard user in it.
  • Now goto any folder and change it to gallery view
Screenshot_from_2016-06-17_20_56_19.png
Screenshot_from_2016-06-17_20_56_19.png From the original on HackerOne
  • Invite that group which u made in step 1 with share privilege .
  • From standard user account, goto that shared folder and make a shared link of any file. E.g:
Screenshot_from_2016-06-17_21_08_32.png
Screenshot_from_2016-06-17_21_08_32.png From the original on HackerOne
  • Untick the can share privilege from that group using folder owner account. Eg:
Screenshot_from_2016-06-17_21_14_13.png
Screenshot_from_2016-06-17_21_14_13.png From the original on HackerOne

Now the shared link which was created by standard user will work as folder shared link. And when folder untick the can share privilege public is automatically created without asking folder owner.

Thanks

The original report as published on HackerOne, by detroitsmash. 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 share was not re-validated against the current folder permissions when the group's sharing privilege was revoked, so the existing link was promoted to a folder-level share.

Impact

Anyone holding the old link could see all files in the folder, even though the group's sharing rights had been withdrawn.

What the attacker needed

A group with a standard user; folder shared with that group; victim holds the old link

How it was found

  1. Create a group and add a standard user to it.
  2. Share a folder with that group, giving it share permission.
  3. As the standard user, open the shared folder and create a public link for one file inside it.
  4. As the folder owner, remove the can share privilege from the group.
  5. Open the previously created link and observe it now exposes the whole folder.

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.

When you share a file with someone, you can later take that permission away. Here, taking the permission away did not cancel a link the person had already made. Instead the link quietly turned into a link for the entire folder, so anyone with it could browse everything inside.

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 detroitsmash

View all

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