Unauthenticated file deletion via deleteFileMessage DDP method allows permanent destruction of any uploaded file
The deleteFileMessage Meteor method deletes any uploaded file by ID without checking authentication, because the authorization check is skipped when no user is logged in. An attacker who knows a file ID, which is exposed in public channel messages and download URLs, could permanently delete that file.
Originally disclosed on HackerOne
- Triaged in 57 days
- Fixed in 3 months
- Disclosed after 3 months
Summary by the program
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.
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 authorization check is conditional on a logged-in user, so an unauthenticated caller bypasses it and reaches the unconditional delete call.
What the attacker needed
Network access to the DDP endpoint; knowledge of a target file ID
The fix
The method should require authentication and verify the caller is authorised before deleting.
How it was found
- Open an unauthenticated DDP WebSocket connection to the server.
- Obtain a target file ID from a public channel message payload or download URL.
- Call the deleteFileMessage method with that file ID.
- The method skips the authorization check and deletes the file from storage and database.
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 file-sharing feature lets people delete their uploaded files. The code that deletes a file only checks whether the person is allowed to do so if someone is logged in; when nobody is logged in, that check is skipped entirely. Because file identifiers are visible in public messages and download links, anyone could send a delete request for someone else's file and it would be removed for good.
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.