Skip to content
Access control Disclosed report Intermediate CVE-2021-32655

File drop public link can also be converted to federated share

A file drop public link could be converted into a federated share by manually crafting a request, even though the UI hides that option. This could grant read permissions to a share that was intended to be write-only, potentially exposing files.

rtod Follow

Originally disclosed on HackerOne

Bounty$500 Low View original
  • Triaged in 12 hours
  • Fixed in 23 days
  • Paid in 13 days
  • Disclosed after 53 days

So bear with me. Because this one requires some user interaction and makes some assumptions.

  1. victim creates a files drop public link
  2. attacker has that link
  3. the 'add to your nextcloud is hidden' but if you manually craft the request and send it a federated share will still be created.

for example

curl 'https://localhost/apps/federatedfilesharing/createFederatedShare' -X POST -d 'shareWith=user2%40https%3A%2F%2Flocalhost&token=KP3wSTdNbxsLGnq'

  1. victim checks their shares for this folder
  2. victim sees the federated share and checks the permission and sees the create permission, freaks out because they didn't want to give anybody that besides the file drop.
  3. Now the share is updated, create permissions are gone but read permissions are granted

So this is kind of a long short. But there is just so much happening that a user without any knowledge of the system can freak out or just mess up. At step 3 the API should error out and just refuse to create the federated share. To make sure no confusion can occur.

Impact

In the worst case making a share readable when it never was. However as stated that is unlikely. But it should be considered and handled graceful as this is actually easy to prevent by a simple check before creating the federated share.

The original report as published on HackerOne, by rtod. 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 server does not check whether the share token belongs to a file drop before creating a federated share, allowing the hidden action to succeed.

Impact

In the worst case, a share that was never meant to be readable could become readable, though the report notes this is unlikely.

What the attacker needed

Victim creates a file drop link; attacker knows the link token; attacker can send crafted requests

How it was found

  1. Victim creates a file drop public link.
  2. Attacker obtains that link.
  3. Attacker manually sends a request to create a federated share using the link's token.
  4. Victim checks their shares and sees the federated share with create permission.
  5. Victim updates the share, removing create permission but granting read permission.

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 file drop link lets someone upload files without seeing what is already there. The report shows that a hidden feature could be triggered by sending a special request, turning the upload-only link into a normal share that lets someone read files. The fix is to block that request when the link is a file drop.

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 rtod

View all

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