Expired reshare links allow access to all files in share
An expired public link to a reshared subfolder still granted access, and instead of showing an expiry message it exposed the parent shared folder. An attacker holding such a link could wait for it to expire and then reach all files in the original share.
- Paid in 4 months
- Disclosed after 7 months
Summary by the program
After a reshared subfolder link has expired, the link allows access to the full folder.
I found the Problem in Nextcloud 14.0.3, but it still persists in 14.0.4 Steps:
- share folder "A" with an nextcloud group
- reshare a subfolder "B" of this folder with another user on this group (in this case the user both have group admin) as public link.
- set an expiry date
- let date expire
- open link Expected result: You see a message that the link has expired Actual result: You have access to the initial shared folder "A"
Impact
After getting a reshared link for a subfolder with expiry date (legitimately or through social engineering) the attacker just has to wait for expiry for full access to all Files in the share.
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 expiry check on the reshared subfolder link was not enforced, and the link resolved to the parent share instead of being rejected.
Impact
An attacker who obtained a reshared subfolder link could wait for it to expire and then gain access to all files in the original share.
What the attacker needed
A reshared subfolder public link; the link's expiry date has passed
How it was found
- Share a folder with a group.
- Reshare a subfolder of it as a public link to another user in that group.
- Set an expiry date on the link.
- Let the date pass.
- Open the link and observe access to the parent folder instead of an expiry message.
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 folder, you can also share a piece of it with someone else, and you can set a date after which that link should stop working. Here, once that date passed, the link did not stop working; it opened the bigger parent folder instead of the small one. So someone who had the link could see more files than they were ever meant to.
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.