Talk / spreed: Disclosure of Room names and participants for password protected rooms
- Triaged in 21 hours
- Fixed in 4 months
- Paid in 6 months
- Disclosed after 6 months
CVSS
5.3 Medium CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N (CVSS isn't always as fine-grained as I'd like; personally, I would rate the issue somewhere between low and medium)
Description
The API of the official spreed/talk extension reveals potentially sensitive information such as room names or participants of password-protected rooms to users without the password.
An account is not required to access room names.
POC: Shared, password protected room leaks room name to unauthenticated attackers
Prerequisite: Create a room, click on "Share link", and enable password protection.
As unauthenticated user, visit the login page to get cookies and a CSRF token.
The unauthenticated user cannot access nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room or nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room/iu86mvxv/participant ("Current user is not logged in"). However, they can access specific rooms based on the room id:
GET /nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room/bk9we2vg HTTP/1.1
Host: 192.168.0.103
[...]
requesttoken: [...]
[...]
Cookie: [...]
Connection: close
HTTP/1.1 200 OK
{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":{"id":13,"token":"bk9we2vg","type":3,"name":"supersecret","displayName":"supersecret","objectType":"","objectId":"","participantType":4,"participantInCall":0,"participantFlags":0,"count":1,"hasPassword":true,"hasCall":false,"lastActivity":1540389616,"unreadMessages":0,"unreadMention":false,"isFavorite":false,"lastPing":0,"sessionId":"0","participants":[],"numGuests":0,"guestList":"","lastMessage":[]}}}
Despite being password protected, the room leaked the room name - which might contain sensitive information - to unauthenticated attackers.
POC: Shared, password protected room leaks participans to authenticated attackers
Prerequisite: Create a room, click on "Share link", and enable password protection.
As an authenticated user, issue the following request:
GET /nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room/bk9we2vg/participants HTTP/1.1
Host: 192.168.0.103
[...]
requesttoken: [...]
[...]
Cookie: [...]
Connection: close
HTTP/1.1 200 OK
{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":[{"inCall":0,"lastPing":1540389861,"sessionId":"hnHuuwybsX6r65fbWFpwqvjZ+R15kumbONTr+ynIO5yu6TpDdPzDXov6+l3H2PkKX7X9FIC4BqAHBoZ\/Ath\/Fqjg9ljuj7smGUyf\/1Z8B\/yw9kotgZd4rM00OOaB2s+8Lph5zizgp7PoHiCvKTw2azAFIWBhLSe9fXQ9sdxzSMYSLAoYCaObU394OQO3ITJVjDQZQ1VOUSx+7dDPI1ycIZVTR\/tOSXg7tfHCigOvetJkRxURCD3V80rdRR2n9IK","participantType":1,"userId":"admin","displayName":"admin"}]}}
Despite being password protected, the room leaked the participant list to an authenticated attacker. From what I can tell, sessionId should not leak either, but isn't useful for an attacker.
Solution
The information should only be displayed to users that have authenticated themselves with the correct password for the room.
Impact
Disclosure of Room names and participants for password protected rooms to unauthenticated or authenticated users without password.
Context
Nextcloud Talk (the spreed app) is the official chat and video-call extension for Nextcloud. Rooms can be shared by link, and a shared room can be protected with a password so that only people who know the password can join. The app exposes a REST API under the OCS namespace, and the client uses that API to fetch room metadata and participant lists.
The report looks at two endpoints of that API and shows that they return data about a password-protected room to callers who never supplied the room password. The affected asset is nextcloud/spreed, the weakness is classified as information disclosure, and the severity given by the program is medium. The researcher notes that CVSS is not always as fine-grained as they would like and that they would personally rate the issue somewhere between low and medium.
Setup
The only precondition is a room that has been shared by link with password protection enabled. To create it: create a room, click on "Share link", and enable password protection.
Two attacker positions are used:
- An unauthenticated user, who first visits the login page to obtain cookies and a CSRF token.
- An authenticated user, who issues the request with their own session.
The requests in the report are sent to a host on a local network and carry a requesttoken header and a Cookie header, both elided in the report. The room token used throughout is bk9we2vg; a second token, iu86mvxv, appears in the description of the endpoints that are refused.
Finding it
The researcher observed that the spreed API reveals potentially sensitive information, such as room names or participants of password-protected rooms, to users who do not have the password. An account is not required to access room names.
What makes this stand out is the contrast between endpoints. Without authentication, the collection endpoint and the participant endpoint of a room are refused:
nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room
nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room/iu86mvxv/participant
Both answer with "Current user is not logged in". The single-room endpoint, addressed by room id, does not apply the same check.
Exploitation
Step 1: Leak the room name without an account
As an unauthenticated user, visit the login page to get cookies and a CSRF token, then request the specific room by its id:
GET /nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room/bk9we2vg HTTP/1.1
Host: [redacted]
[...]
requesttoken: [...]
[...]
Cookie: [...]
Connection: close
Both the requesttoken and Cookie headers are elided in the report. The response is a normal success:
HTTP/1.1 200 OK
{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":{"id":13,"token":"bk9we2vg","type":3,"name":"supersecret","displayName":"supersecret","objectType":"","objectId":"","participantType":4,"participantInCall":0,"participantFlags":0,"count":1,"hasPassword":true,"hasCall":false,"lastActivity":1540389616,"unreadMessages":0,"unreadMention":false,"isFavorite":false,"lastPing":0,"sessionId":"0","participants":[],"numGuests":0,"guestList":"","lastMessage":[]}}}
The body confirms the room is protected ("hasPassword":true) and still returns the room name ("name":"supersecret", "displayName":"supersecret") together with the room token, type, activity timestamp and other metadata. The caller never supplied the room password. The researcher's point is that a room name might itself contain sensitive information, and here it is handed to an unauthenticated attacker.
Step 2: Leak the participant list with an account
As an authenticated user, request the participants of the same room:
GET /nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room/bk9we2vg/participants HTTP/1.1
Host: [redacted]
[...]
requesttoken: [...]
[...]
Cookie: [...]
Connection: close
The response again succeeds and returns the participant list:
HTTP/1.1 200 OK
{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":[{"inCall":0,"lastPing":1540389861,"sessionId":"hnHuuwybsX6r65fbWFpwqvjZ+R15kumbONTr+ynIO5yu6TpDdPzDXov6+l3H2PkKX7X9FIC4BqAHBoZ\/Ath\/Fqjg9ljuj7smGUyf\/1Z8B\/yw9kotgZd4rM00OOaB2s+[redacted]+7dDPI1ycIZVTR\/[redacted]","participantType":1,"userId":"admin","displayName":"admin"}]}}
Each entry carries inCall, lastPing, sessionId, participantType, userId and displayName. The room is password protected, yet the list is returned to an authenticated attacker who does not know the password. The researcher adds that, from what they can tell, sessionId should not leak either, but that it is not useful for an attacker.
Root cause
The report does not include the code, so the mechanism can only be inferred. The observable pattern is that the collection endpoint and the participant endpoint reject an unauthenticated caller with "Current user is not logged in", while the single-room endpoint and the participants endpoint return data for a password-protected room without any check that the caller has authenticated against the room password. The report does not explain the cause; it only shows that these read paths return data without a room password check. The hasPassword flag in the response shows the server knows the room is protected; it simply does not act on that knowledge for these requests.
Impact
An unauthenticated attacker who knows or guesses a room token can read the room name and metadata of a password-protected room. An authenticated attacker without the room password can read the participant list, including user IDs and display names, and the sessionId value. The report frames this as disclosure of room names and participants for password-protected rooms to unauthenticated or authenticated users without the password. The researcher hedges the severity: the CVSS vector scores 5.3 Medium, but they would personally place the issue between low and medium.
Fix
The report states the requirement rather than a patch: the information should only be displayed to users that have authenticated themselves with the correct password for the room. In practice that means the endpoints must verify the room password before returning room metadata or participant data.
Variants to test
- Enumerate other read endpoints under the same API prefix (for example anything that returns room metadata or membership) and call them with a room token for a password-protected room, without the password. A positive result is a 200 response containing the room name, participant data or other room details.
- Repeat the single-room request with no session at all, rather than with cookies from the login page. A positive result is the same room metadata coming back to a fully anonymous caller.
- Compare the refused endpoints with the accepted ones on the same room token. A positive result is a pair where the collection or participant path answers "Current user is not logged in" while a token-specific path returns data.
- Check whether the
sessionIdvalue returned in the participant list can be reused elsewhere in the API. A positive result would be a request that accepts it as a credential, which the report does not demonstrate.
Hunting notes
This kind of bug tends to sit where an application has two layers of access control: a login check on collection endpoints and a separate, easily forgotten password check on resources shared by link. The signal during recon is a feature that offers "share link with password" and an API that addresses individual resources by an opaque token. If the token alone is enough to fetch the resource, the password is probably only enforced in the UI or on the join path.
The researcher showed impact in two steps that map directly onto the two attacker models: an unauthenticated request proving the room name leaks, and an authenticated request proving the participant list leaks. Both are single requests with a clear 200 response containing data that the password was supposed to protect.
What happened, in plain words
Nextcloud is a piece of software that lets an organisation run its own file storage and collaboration server. Talk, also known by its internal name spreed, is the chat and video-call add-on for Nextcloud. Inside Talk you can create a room, which is a place where people chat and call each other. A room can be shared by sending someone a link, and that link can be locked with a password so that only people who know the password can get in.
A password on a shared link is a bit like a lock on a diary. You can hand the diary to anyone, but only the person with the key can read what is inside. The report shows that in this case the lock was on the cover, but the table of contents was printed on the outside: the room name, and later the list of people in the room, could be read by someone who never typed the password.
The report looks at two specific requests that a browser or a script can send to the Nextcloud server, and shows that both of them hand back information about a password-protected room to someone who does not know the password. The first request needs no account at all. The second needs an account, but not the room password. The weakness is classified as information disclosure, which simply means that data which should have stayed private was shown to the wrong person. The program rated it medium severity. The researcher notes that the CVSS scoring system is not always as fine-grained as they would like, and that they would personally rate the issue somewhere between low and medium.
The pieces you need to know first
Before walking through the steps, here are the ideas the report relies on, explained from scratch.
Server and client. The Nextcloud installation runs on a computer called a server. Your browser, or a small program that sends requests, is the client. The client asks, the server answers.
HTTP request and response. When your browser loads a page, it sends an HTTP request to the server, and the server sends back an HTTP response. A request has a method (such as GET, meaning "give me this"), a path (which thing you want), and headers (extra labels with details). A response has a status code, where 200 OK means "here you go, everything worked", and a body, which is the actual content.
API. An API is a way for programs to talk to a server without a human clicking buttons. Think of a restaurant: the menu is the API, the kitchen is the server, and the waiter carries your order. You do not walk into the kitchen yourself; you ask for a named dish and get it back. Here the API is a REST API, which means each thing you can ask for has its own address, called an endpoint, and you use standard HTTP requests to reach it.
Endpoint. An endpoint is one specific address on the server that answers one specific kind of request. The report deals with a few of them, all under a path that starts with ocs/v2.php/apps/spreed/api/v1/room.
OCS namespace. Nextcloud groups many of its APIs under a prefix called OCS. You can think of it as a folder name in the address that tells the server "this is one of the programmatic interfaces, not a normal web page".
Room token. Every Talk room has a short random identifier, called a token, such as bk9we2vg. It is not the room name and it is not a password; it is more like a locker number. If you know the number, you can ask about that locker. The report uses bk9we2vg throughout, and a second token, iu86mvxv, appears when describing endpoints that are refused.
Cookie. A cookie is a small piece of data that a website asks your browser to store and send back on every later request. It is how a website recognises you between page loads, for example to remember that you are logged in. Think of it as a wristband you get at the entrance of an event: you show it at every door instead of proving who you are again.
CSRF token. CSRF stands for cross-site request forgery. It is an attack where a malicious website tricks your browser into sending a request to another site where you are logged in. To defend against it, many applications give you a second, secret value called a CSRF token, which you must include with requests that change or read data. The server checks that the token matches your session. In Nextcloud this value travels in a header called requesttoken. A header is just a labelled line in the request, like a note attached to a parcel.
Authenticated and unauthenticated. Authenticated means the server knows who you are, usually because you logged in and your cookie proves it. Unauthenticated means you have no account or have not logged in. The report uses both positions on purpose, to show that the leak happens in two different situations.
Information disclosure. This is the vulnerability class. It means the application reveals data to someone who should not have it. Nothing is changed or deleted; the harm is that secrets become known.
CVSS. CVSS is a standard scoring system for the severity of a security issue. It produces a number and a vector string, which is a compact code describing the characteristics of the issue. A higher number means more severe.
Setting up the target
The only precondition is a room that has been shared by link with password protection turned on. To create it: create a room, click on "Share link", and enable password protection. That is the whole setup. No special configuration, no unusual plugin, just the normal sharing feature used as intended.
The report then uses two attacker positions:
- An unauthenticated user, who first visits the login page to obtain cookies and a CSRF token.
- An authenticated user, who sends the request with their own session.
Why visit the login page first if you are not going to log in? The unauthenticated user first visits the login page to obtain cookies and a CSRF token. The requests in the report carry both a requesttoken header and a Cookie header, and both are elided in the report, shown as [...]. The requests carry a Host header and both a requesttoken and a Cookie header, the latter two elided in the report.
Finding it
The researcher observed that the spreed API reveals potentially sensitive information, such as room names or participants of password-protected rooms, to users who do not have the password. An account is not required to access room names.
What makes this stand out is the contrast between endpoints. Without authentication, the collection endpoint and the participant endpoint of a room are refused:
nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room
nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room/iu86mvxv/participant
The first line is the room collection endpoint. The second is the participant endpoint for the room whose token is iu86mvxv. Both answer with "Current user is not logged in". In other words, the server does have a login check on these two paths, and it works.
The single-room endpoint, addressed by room id, does not apply the same check. That is the gap: the same API, the same kind of data, but one address is guarded and another is not.
Exploitation
Step 1: Leak the room name without an account
As an unauthenticated user, visit the login page to get cookies and a CSRF token, then request the specific room by its id:
GET /nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room/bk9we2vg HTTP/1.1
Host: [redacted]
[...]
requesttoken: [...]
[...]
Cookie: [...]
Connection: close
Line by line:
GET /nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room/bk9we2vg HTTP/1.1is the request line.GETmeans "read this". The path points at the single-room endpoint for the room whose token isbk9we2vg.HTTP/1.1is the version of the protocol being spoken.Host: [redacted]tells the server which machine the request is addressed to. Here it is a machine on a local network.[...]stands for headers the report left out.requesttoken: [...]carries the CSRF token obtained from the login page. The value is elided.[...]again stands for omitted headers.Cookie: [...]carries the session cookies from the same visit to the login page. The value is elided.Connection: closeasks the server to close the network connection after answering, rather than keeping it open for more requests.
The response is a normal success:
HTTP/1.1 200 OK
{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":{"id":13,"token":"bk9we2vg","type":3,"name":"supersecret","displayName":"supersecret","objectType":"","objectId":"","participantType":4,"participantInCall":0,"participantFlags":0,"count":1,"hasPassword":true,"hasCall":false,"lastActivity":1540389616,"unreadMessages":0,"unreadMention":false,"isFavorite":false,"lastPing":0,"sessionId":"0","participants":[],"numGuests":0,"guestList":"","lastMessage":[]}}}
Line by line:
HTTP/1.1 200 OKis the status line.200means the request succeeded and the body follows.- The body is a JSON document. JSON is a text format for structured data: curly braces hold an object, and each entry is a name in quotes, a colon, and a value. It is the format programs use to exchange data in a way both sides can read.
"ocs"is the outer object, the wrapper Nextcloud uses for its OCS API. Inside it,"meta"describes the result:"status":"ok","statuscode":200,"message":"OK"."data"is the actual room information."id":13is the internal numeric id."token":"bk9we2vg"is the room token."type":3is the room type."name":"supersecret"and"displayName":"supersecret"are the room name. This is the sensitive part."hasPassword":trueis the server stating, in the same response, that the room is protected by a password.- The remaining fields are metadata:
"participantType":4,"participantInCall":0,"participantFlags":0,"count":1,"hasCall":false,"lastActivity":1540389616,"unreadMessages":0,"unreadMention":false,"isFavorite":false,"lastPing":0,"sessionId":"0","participants":[],"numGuests":0,"guestList":"","lastMessage":[].
The body confirms the room is protected ("hasPassword":true) and still returns the room name ("name":"supersecret", "displayName":"supersecret") together with the room token, type, activity timestamp and other metadata. The caller never supplied the room password. The researcher's point is that a room name might itself contain sensitive information, and here it is handed to an unauthenticated attacker. The hasPassword flag makes the contradiction visible in a single line: the server knows the room is locked, and shows the label on the door anyway.
Step 2: Leak the participant list with an account
As an authenticated user, request the participants of the same room:
GET /nextcloud/nextcloud/ocs/v2.php/apps/spreed/api/v1/room/bk9we2vg/participants HTTP/1.1
Host: [redacted]
[...]
requesttoken: [...]
[...]
Cookie: [...]
Connection: close
Line by line:
- The request line is the same as before, except the path now ends in
/participants. That suffix asks for the list of people in the room, not the room itself. Host,requesttoken,CookieandConnectionmean exactly what they meant in step 1. The difference is that the cookie now belongs to a logged-in user, so the server knows who is calling.
The response again succeeds and returns the participant list:
HTTP/1.1 200 OK
{"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK"},"data":[{"inCall":0,"lastPing":1540389861,"sessionId":"hnHuuwybsX6r65fbWFpwqvjZ+R15kumbONTr+ynIO5yu6TpDdPzDXov6+l3H2PkKX7X9FIC4BqAHBoZ\/Ath\/Fqjg9ljuj7smGUyf\/1Z8B\/yw9kotgZd4rM00OOaB2s+[redacted]+7dDPI1ycIZVTR\/[redacted]","participantType":1,"userId":"admin","displayName":"admin"}]}}
Line by line:
HTTP/1.1 200 OKagain means success.- The outer
"ocs"wrapper and its"meta"block are the same as before. "data"is now a list, marked by square brackets, because there can be several participants. Here it holds one entry."inCall":0says whether that person is currently in a call.0means no."lastPing":1540389861is a timestamp of the last activity."sessionId"is a long encoded string. A session id is the server's internal label for a particular connection or session. The researcher adds that, from what they can tell,sessionIdshould not leak either, but that it is not useful for an attacker."participantType":1is the role of the participant in the room."userId":"admin"and"displayName":"admin"identify the person: their account name and the name shown in the interface.
The room is password protected, yet the list is returned to an authenticated attacker who does not know the password.
Why it happens
The report does not include the code, so the mechanism can only be inferred. The observable pattern is that the collection endpoint and the participant endpoint reject an unauthenticated caller with "Current user is not logged in", while the single-room endpoint and the participants endpoint return data for a password-protected room without any check that the caller has authenticated against the room password. The report does not explain the cause; it only shows that these read paths return data without a room password check. The hasPassword flag in the response shows the server knows the room is protected; it simply does not act on that knowledge for these requests.
A useful comparison: a hotel receptionist who checks your key card at the front door but not at the door of the conference room. The check exists, it is just not applied at every entrance.
Impact
An unauthenticated attacker who knows or guesses a room token can read the room name and metadata of a password-protected room. An authenticated attacker without the room password can read the participant list, including user IDs and display names, and the sessionId value. The report frames this as disclosure of room names and participants for password-protected rooms to unauthenticated or authenticated users without the password. The researcher hedges the severity: the CVSS vector scores 5.3 Medium, but they would personally place the issue between low and medium.
The fix
The report states the requirement rather than a patch: the information should only be displayed to users that have authenticated themselves with the correct password for the room. In practice that means the endpoints must verify the room password before returning room metadata or participant data.
Other places to look
- Enumerate other read endpoints under the same API prefix (for example anything that returns room metadata or membership) and call them with a room token for a password-protected room, without the password. A positive result is a 200 response containing the room name, participant data or other room details.
- Repeat the single-room request with no session at all, rather than with cookies from the login page. A positive result is the same room metadata coming back to a fully anonymous caller.
- Compare the refused endpoints with the accepted ones on the same room token. A positive result is a pair where the collection or participant path answers "Current user is not logged in" while a token-specific path returns data.
- Check whether the
sessionIdvalue returned in the participant list can be reused elsewhere in the API. A positive result would be a request that accepts it as a credential, which the report does not demonstrate.
Notes for anyone hunting similar bugs
This kind of bug tends to sit where an application has two layers of access control: a login check on collection endpoints and a separate, easily forgotten password check on resources shared by link. The signal during recon is a feature that offers "share link with password" and an API that addresses individual resources by an opaque token. If the token alone is enough to fetch the resource, the password is probably only enforced in the UI or on the join path.
The researcher showed impact in two steps that map directly onto the two attacker models: an unauthenticated request proving the room name leaks, and an authenticated request proving the participant list leaks. Both are single requests with a clear 200 response containing data that the password was supposed to protect.
Glossary
- API: a defined set of addresses and rules that lets programs ask a server for data or actions, without a human clicking through pages.
- Authenticated: the server knows who is making the request, usually because the caller logged in and presented a valid session cookie.
- Cookie: a small value stored by the browser and sent back with later requests so the server can recognise the same visitor.
- CSRF (cross-site request forgery): an attack that tricks a logged-in browser into sending a request to another site; applications defend against it with a secret token.
- CSRF token: a secret value the client must include with requests, checked by the server to prove the request came from the application itself.
- CVSS: a standard system for scoring the severity of a security issue, producing a number and a vector string.
- Endpoint: one specific address on a server that answers one specific kind of request.
- Header: a labelled line in an HTTP request or response carrying extra information, such as a cookie or a token.
- HTTP: the protocol browsers and servers use to exchange requests and responses.
- Information disclosure: a weakness where data that should stay private is shown to someone who should not see it.
- JSON: a text format for structured data, built from objects in curly braces and lists in square brackets.
- OCS: the namespace Nextcloud uses for many of its programmatic APIs.
- REST API: an API where each resource has its own address and is reached with standard HTTP methods such as
GET. - Room token: a short random identifier for a Talk room, used in API addresses; it is not a password.
- Session: the server's record of a visitor's ongoing interaction, identified by a cookie or session id.
- Session id: the server's internal label for a particular session or connection.
- Spreed: the internal name of the Nextcloud Talk app.
- Status code: the number in an HTTP response saying how the request went, such as
200for success. - Unauthenticated: the caller has no account or has not logged in, so the server does not know who they are.