Skip to content
Info disclosure Disclosed report Intermediate CVE-2021-32656

Trusted servers exchange can be triggered by attacker

When trusted servers are enabled, creating a federated share from a public link automatically triggers a trusted server handshake that exchanges the full user list. An attacker can use any circulating public link to obtain all usernames, display names, emails, and federated cloud IDs from the victim instance.

rtod Follow

Originally disclosed on HackerOne

Bounty$750 Medium 4.3 View original
  • Triaged in 2 days
  • Fixed in 23 days
  • Paid in 23 days
  • Disclosed after 53 days

Hi again,

So this seems to be less bad these days as the trusted servers are no longer enabled by default (however they were some versions ago). The trusted servers exchanged the full user list with another server. As soon as 1 federated share is created between two instances. It is questionable if this is something that should be allowed by 1 federated share on corporate systems. But maybe this is more of a community feature?

But back to the issue at hand. If trusted servers are enabled. Then a single public link share can expose the whole system address book to an attacker. To take again the example of cloud.nextcloud.com

  1. Assume trusted servers are enabled
  2. Pick one of the many public links that circulate
  3. Click 'add to your nextcloud' and point it to your own server
  4. Accept the federated share
  5. wait for the trusted server handshake and exchange
  6. Now you have a list of all users on cloud.nextcloud.com

This happens because the federated share is created. And thus the trusted server logic kicks in.

Impact

If a system has the "Add server automatically once a federated share was created successfully" enabled. Then if there is a public link circulating an attacker can obtain the shared info from all users on the system

This can contain

  • username
  • displayname
  • email
  • federated cloud id

Possibly more but I did not check.

If this is part of the expected behavior. Then I feel this should be communicated a lot more clear when an admin tries to enable this.

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 trusted server auto-exchange logic runs whenever a federated share is created, without checking whether the share was initiated by an authorised administrator rather than an anonymous public link user.

Impact

If the 'Add server automatically once a federated share was created successfully' setting is enabled, an attacker with any public link can obtain the shared info of all users on the system, which may include usernames, display names, emails, and federated cloud IDs.

What the attacker needed

Trusted servers enabled; a public link share exists; attacker controls a federated server

The fix

The report suggests that if this behaviour is intended, administrators should be warned much more clearly when enabling the feature; the text does not state that it was fixed.

How it was found

  1. Assume trusted servers are enabled
  2. Pick a public link that is circulating
  3. Click 'add to your nextcloud' and point it to your own server
  4. Accept the federated share
  5. Wait for the trusted server handshake and exchange
  6. Obtain the list of all users on the target instance

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 federated share lets two separate Nextcloud servers share files with each other. When 'trusted servers' is turned on, the servers automatically exchange their full lists of users after a share is created. The problem is that anyone can start this exchange by using a public link, so an outsider can get a list of everyone on the server.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

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.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.