# Trusted servers exchange can be triggered by attacker

A single public link share added as a federated share triggers the trusted-server handshake, leaking the entire system address book (usernames, emails, cloud IDs) to an attacker-controlled server.

- Payout: $750
- Severity: medium
- Program: Nextcloud
- Found by: rtod
- Disclosed: 2021-06-10
- CVE: CVE-2021-32656
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1167853
- Library page: https://bugbountylibrary.com/r/h1%3A1167853
- Tags: area:web domain:web impact:data-leak impact:pii-leak kind:bounty platform:hackerone sev:medium technique:chained vuln:access-control vuln:info-disclosure

**Target:** Nextcloud federated sharing / trusted servers auto-add logic
**Root cause:** Creating a federated share automatically adds the remote server as trusted when 'Add server automatically once a federated share was created successfully' is enabled, and trusted servers exchange the full user list.
**Steps:**
1. Assume trusted servers enabled with auto-add on federated share creation
2. Find a circulating public link share on target instance
3. Click 'add to your nextcloud' pointing to attacker's own server
4. Accept the federated share
5. Wait for trusted server handshake and address book exchange
6. Receive full user list of target instance
**How found:** Noticed trusted servers were previously enabled by default and reasoned that the auto-add-on-federated-share feature lets any federated share creation trigger the trusted server exchange, then tested with a public link.
**Exploitation:** Attacker hosts a Nextcloud instance, uses any public link share from the victim to initiate a federated share, accepts it, and the auto-trust logic causes the victim to push its full system address book to the attacker's server.
**Insight:** Features that auto-trust a peer based on a low-friction action (accepting a share) can turn any shareable public link into a pivot to trigger privileged server-to-server data exchange like address book sync.

