Skip to content
Access control Disclosed report Intermediate CVE-2020-8153

User can delete data in shared folders he's not autorized to access

A user without permissions to a hidden folder could overwrite it by renaming a synced folder to the same name, causing data loss. The attacker could delete sensitive data that was intentionally hidden from their group.

jlord87 Follow

Originally disclosed on HackerOne

  • Triaged in 41 hours
  • Fixed in 8 months
  • Paid in 8 months
  • Disclosed after 9 months

###Steps to reproduce

  1. create a group folder named TEST and share with "admin group" and "test group", marking the advanced permission flag
  2. create two folders inside the main share: visible and invisible
  3. inside "invisible" folder create a test file (let's say something like "test.txt")
  4. set the advanced folder permission to deny everything to "test group" for the "invisible" folder (deny read, deny write, deny share, deny create, deny delete...)
  5. log in with test user (member of test group). The invisible folder is not shown, you can only see the visible one. That's great.
  6. if you try to create a folder named "invisible" you get an error (that's good too) sync the new external share to your pc (in my case win7 with 2.5.2 client). Only the "visible" folder is synced.
  7. create a folder named "temp" and create inside this new folder a new file (lets say "test2.txt"). This folder will be synced online
  8. rename temp to invisible
  9. the folder gets synced online overwriting the originale "invisible" folder

###Expected behaviour

The sync client should keep denying the syncronization of "invisible" folder to the unauthorized users

###Actual behaviour

The folder is synced, the original one and all its content (that should be inaccessible to test user) are overwritten and lost

Impact

An "attacker" - that could simply be an user with low privileges - can delete sensitive data that were on purpose hidden to its group.

The original report as published on HackerOne, by jlord87. 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 sync server did not re-check folder-level permissions when a client renamed a folder to a name that already existed but was hidden from that user.

Impact

A low-privileged user could overwrite and delete sensitive data that was intentionally hidden from their group.

What the attacker needed

A low-privileged account in a group; a shared folder with advanced permissions; sync client installed

How it was found

  1. Create a group folder and share it with two groups, enabling advanced permissions.
  2. Create two subfolders, one visible and one invisible to the test group.
  3. Put a test file inside the invisible folder.
  4. Deny all permissions to the test group for the invisible folder.
  5. Log in as a test user and confirm the invisible folder is not shown and cannot be created directly.
  6. Sync the share to a PC, create a new folder with a file, rename it to the invisible folder's name, and let it sync.

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.

A shared folder had a subfolder that some users were not allowed to see. Those users could still use the sync client to create a folder with the same name, and the system would replace the hidden folder with theirs, destroying the original 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 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.