Skip to content
DoS Disclosed report Intermediate CVE-2021-32703

index.php/apps/files_sharing/shareinfo endpoint is not properly protected

The federated sharing endpoint that returns file lists for share tokens lacks brute-force protection and rate limiting, and it accepts any share token including public link tokens. An attacker could enumerate tokens, and by repeatedly requesting large file trees cause high query and memory load, leading to denial of service.

rtod Follow

Originally disclosed on HackerOne

Bounty$100 Medium 5.3 View original
  • Triaged in 2 days
  • Fixed in 18 days
  • Paid in 17 days
  • Disclosed after 4 months

When federated shares between two Nextclouds are created they do not use standard webdav to communciate. But to obtain the filelist they seem to use the SERVER/index.php/apps/files_sharing/shareinfo endpoint.

Unlike the other endpoint for tokens (like public link shares). There is no brute force protection here. So this could be used as enumeration endpoint for available tokens. This is not likely to generate a hit due to the search space. But considering you do limit this on the public link endpoint for example it still seems relevant.

Now this brings me to the second part that struck me on this endpoint. It is essentially sending back the entire file tree below it. Meaning if this is a big file tree it you could just keep sending requests to the server keeping it quite busy. (and all requests are valid and won't be flagged). There is no rate limiting at all.

Then this brings me to the final part This endpoint accepts all token shares. Even link share tokens (meaning you don't even have to use the 'add to your Nextcloud'), (and there is no check if federation is enabled). So in short. If you have a link share with a big file tree (or you create it yourself if there is write access).

Impact

Possible to perform denial of service attacks by sending a lot of valid request that could lead to a significant number of queries and memory usage on the system.

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 shareinfo endpoint was implemented without the brute-force protection and rate limiting applied to other token endpoints, and it does not restrict which share types or federation settings it accepts.

Impact

An attacker could perform denial of service by sending many valid requests that cause a significant number of queries and memory usage; the text notes token enumeration is unlikely to succeed due to the search space.

What the attacker needed

A share token, possibly a public link token; ability to send many requests; a large file tree to amplify load

The fix

The endpoint lacks the brute-force protection and rate limiting used on other token endpoints, and does not restrict share types or check federation.

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.

Nextcloud lets people share files with others, sometimes across different servers. A special web address used for that sharing returns the list of files for a share token, but it has no protection against someone trying many tokens quickly or sending many requests. That means an attacker could guess tokens or overload the server by asking for big file lists over and over.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

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.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.