Contacts menu (not app) fails to restrict (to local groups) for contacts from federated servers
The contacts menu in Nextcloud fails to apply the configured group-sharing restrictions to contacts from federated servers, so a user in a new group can see all contacts from a federated instance. This could expose sensitive contact information, potentially leading to a GDPR-relevant data breach.
- Fixed in 14 days
- Disclosed after 44 days
In two Nextclouds A and B, in settings/admin/sharing, these settings are enabled:
- Restrict users to only share with users in their groups
- Restrict username autocompletion to users within the same groups
- Add server automatically once a federated share was created successfully
Some user on A now shares something to some other user on B → federation for that server is established and green on both NCs.
On B, add a new group with a new user N. That user is the only user in that new, separate group. Log in as N. Click on contacts menu (next to the user menu). One sees all contacts of A. One shouldn't see any.
This is relevant since it is unexpected and NC lacks a means to restrict viewing of such contact data. This may lead to a GDPR relevant data breach. (In my case, it did!) IF data were COPIED to B (cached?, not sure), this would be even worse.
Deleting the federation solves the issue (but breaks functionality otherwise desired). I propose to add further restriction selections (for contacts from federated servers) to sharing.
Sidenote: The way it is now also has a functional glitch: If one clicks in the info "i" next to one contact from a federated server, the "contacts" app opens and shows an error "No such contact found"…
Impact
Well, what SECURITY impact? It's a PRIVACY impact. But since Nextcloud strives to be the privacy-friendly alternative to big players…
OK: Impact is simple contact information disclosure. But to make clear what dimensions this could lead to: Imagine all business contact information in A (in my case >1000 contacts), readable to completely unrelated people on another instance.
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
Impact
A user on one Nextcloud instance could view all contacts from a federated instance, potentially exposing sensitive contact information and leading to a GDPR-relevant data breach.
What the attacker needed
Two Nextcloud instances with federation; Group-sharing restrictions enabled; A federated share between users; A user in a separate group
The fix
The reporter proposes adding further restriction options for federated contacts to sharing settings.
How it was found
- Enable the three sharing restrictions in settings/admin/sharing on both servers.
- Create a federated share from a user on server A to a user on server B to establish federation.
- On server B, create a new group and a new user N who is the only member of that group.
- Log in as user N and open the contacts menu.
- Observe that all contacts from server A are displayed.
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 is a file-sharing and collaboration tool. When two Nextcloud servers are connected (federated), users can share with each other. The admin can restrict sharing to only people in the same group, but the contacts menu ignores this restriction for contacts from the other server, so a user can see contacts they should not.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.