Description
Rocket.Chat in versions <8.5.1, <8.4.4, <8.3.6, <8.2.6, <8.1.6, <8.0.7, <7.13.9, and <7.10.13 is vulnerable to unauthenticated file deletion. The deleteFileMessage Meteor method permanently deletes any uploaded file by ID without requiring authentication. When called via an unauthenticated DDP WebSocket connection, Meteor.userId() returns null, causing the authorization check to be skipped. Execution falls through to FileUpload.getStore('Uploads').deleteById(fileID), which removes the file from storage and database unconditionally. File IDs are discoverable from public channel message payloads and download URLs.
Problem types
CWE-287 Improper Authentication - Generic
Product status
Any version before 8.5.1
Any version before 8.4.4
Any version before 8.3.6
Any version before 8.2.6
Any version before 8.1.6
Any version before 8.0.7
Any version before 7.13.9
Any version before 7.10.13
References
github.com/RocketChat/Rocket.Chat/pull/40889/