Talk - Leak of password-protected room name via already existent resource addition
A low-privileged authenticated user could add an already-shared file to a project collection and receive back the name and ID of a password-protected Talk room they were not a member of. By iterating over resource IDs, an attacker could gather the names of all affected password-protected rooms.
- Triaged in 26 hours
- Fixed in 23 days
- Paid in 23 days
- Disclosed after 7 months
CVSS
Medium 4.3 CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Description
Affected: Talk / Spreed 6.0.3
The name of shared but password-protected rooms leaks to low-privileged authenticated users.
An attacker does not need to guess room IDs, but can simply iterate over IDs to gather all names of all affected rooms.
POC
Setup:
- Add a password-protected room: Talk -> New conversation -> enter a name -> Share link -> set password
- Add a project: Projects -> Add a project -> select a file
Attack with a low-privileged user:
-
Build the following request (eg by going to Projects -> Add project -> select a file in a project the user has access to):
POST /nextcloud/nextcloud/ocs/v2.php/collaboration/resources/collections/21?format=json HTTP/1.1 Host: 192.168.0.104 User-Agent: [...] Accept: application/json, text/plain, */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/json;charset=utf-8 requesttoken: [...] Content-Length: 43 Connection: close Cookie: [...] {"resourceType":"file","resourceId":"1619"}
16 is the ID of the password-protected room that the user does not have access to. 1626 is the ID of a file that was shared under the "projects" tab in that room. It is required that the file is already shared, but IDs are iterative and can easily be bruteforced.
The response will contain the room name & ID and the name of the shared file:
HTTP/1.1 200 OK
[...]
{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":{"id":21,"name":"privateprivateprivate","resources":[{"type":"file","id":"1619","name":"aaaa.txt","path":"files\/aaaa.txt","link":"http:\/\/192.168.0.104\/nextcloud\/nextcloud\/index.php\/f\/1619","mimetype":"text\/plain","preview-available":true},{"type":"room","id":"w3die6ou","name":"privateprivateprivate","call-type":"public","iconUrl":"http:\/\/192.168.0.104\/nextcloud\/nextcloud\/apps\/spreed\/img\/app-dark.svg","link":"http:\/\/192.168.0.104\/nextcloud\/nextcloud\/index.php\/call\/w3die6ou"}]}}}
Impact
leak of all password-protected room names to low-privileged attacker
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 collaboration-resources endpoint returned details of the room linked to a shared file without checking whether the requesting user was allowed to see that room.
Impact
All password-protected room names could be disclosed to a low-privileged authenticated attacker.
What the attacker needed
A low-privileged authenticated account; a file already shared in the target room
How it was found
- Create a password-protected room and share a file in it under the projects tab.
- As a low-privileged user, send a request to the collaboration resources collections endpoint with a file resource ID.
- Read the room name and ID from the JSON response.
- Iterate over IDs to collect names of other protected rooms.
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 password-protected chat room is meant to be hidden from people who do not know the password. Here, a logged-in user with few rights could ask the server to attach a file to a project, and the server's reply included the secret room's name. Repeating this with different numbers let them collect many room names.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.