Low authorization level at server side API operation e2e.updateGroupKey, let an attacker break the E2E architecture.
The server-side API operation e2e.updateGroupKey lacked proper authorisation checks, so a user could insert or overwrite the encrypted room key stored for other members of a secure chat room. An attacker could thereby break the end-to-end encryption architecture of that room.
- Triaged in 7 days
- Fixed in 3 months
- Disclosed after 4 months
Summary by the program
During my personal revision of the E2E encryption feature enable by default at open.rocket.chat server, that allow users to encrypt messages under application layer inside on a specific secure chat room, I found the following vulnerability: It's possible to break the E2E encryption of a secure chat room. The root cause of the vulnerability is the server side API operation e2e.updateGroupKey. This operation as you should know is in charged to insert or update the E2EKey on the rocketchat_subscription table on the server Database non-relational (MongoDB). The rocketchat_subscription collection, contains for each user that belong to an existing encrypted chat room, an entry with the E2EKey. This E2EKey is an Asymmetric encrypted base64 data with RSA that use the public_key value stored on the user collection for an specific user, for encrypting the room-key. This room-key is used to encrypt and decrypt with symmetric AES algorithm the messages stored for the in the server database, for the specific secure chat.
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 e2e.updateGroupKey API operation did not verify that the caller was authorised to modify the group key entries for the targeted room and users.
Impact
An attacker could break the E2E encryption of a secure chat room, though the text does not show a full exploit or confirm it was fixed.
What the attacker needed
Ability to call the e2e.updateGroupKey API operation
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.
In an encrypted chat room, each member has a copy of the room key locked with their own public key, and that locked copy is stored on the server. This report says the server endpoint that writes those locked copies did not check properly who was allowed to call it, so someone could replace them. That would let them interfere with the encryption other members rely on.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.