User deletion is not handled properly everywhere
When a user account is deleted, their chat history in Nextcloud Talk is not removed, so a new account later assigned the same user identifier can open the old conversation and read the previous user's messages. This lets a new user see data belonging to a departed user.
- Triaged in 2 hours
- Fixed in 15 days
- Paid in 41 days
- Disclosed after 58 days
So I came across this when going over https://nextcloud.com/compare/
And noticed the section: "BUILT IN DATA-REQUEST/ACCOUNT DELETION"
However looking at this it seems this is not handled properly everywhere in Nextcloud. I understand that the GDPR etc do consider shared data differently. For example a conversation two people have is shared data often and does not always have to be deleted.
In anycase let me describe what I found.
- userA has an account on server
- userB has an account on server
- userA and userB do a lot of chatting via talk
- At some point userB leaves the server and their account is deleted
- Now a new user comes along that gets assigned the id userB (or registers it or whatever)
- If the new userB now opens the chat to userA they will see all the messages exchanged between userA and the old userB
Impact
New users might get access to data of other users that left the system. This should not happen.
I would suggest (to make your own life easier) to keep a blocklist of ids for users. So that these things can't happen. You still have to make sure all required data is removed. But of you miss something at least it won't possibly get leaked to new users.
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 deletion process does not remove or reassign all data tied to the user identifier, and identifiers can be reused by new accounts.
Impact
New users might get access to data of other users that left the system.
What the attacker needed
Two accounts on the server; chat history between them; one account deleted; identifier reused by a new account
The fix
The reporter suggests keeping a blocklist of retired user identifiers so they cannot be reused, while still ensuring all required data is removed.
How it was found
- Two users have accounts on the server.
- The two users chat extensively using Talk.
- One user leaves and their account is deleted.
- A new user is assigned or registers the same identifier.
- The new user opens the chat with the remaining user and sees the old messages.
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.
Every account has a name or identifier that other parts of the system use to link data to it. If that account is deleted but its data is kept, and someone new later gets the same identifier, the system treats the old data as belonging to the new person. Here that meant a new user could read a chat that belonged to a previous user.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.