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

- Invite that group which u made in step 1 with
shareprivilege . - From standard user account, goto that shared folder and make a shared link of any file. E.g:

- Untick the
can shareprivilege from that group using folder owner account. Eg:

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
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
- Create a group and add a standard user to it.
- Share a folder with that group, giving it share permission.
- As the standard user, open the shared folder and create a public link for one file inside it.
- As the folder owner, remove the can share privilege from the group.
- 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.