Unauthenticated reading of every file via livechat auth and predicting MongoDB ObjectId()
The file download endpoint authorised livechat users by checking a room type and room ID/token pair, but never verified that the room ID matched the requested file's room. Because file IDs were sequential MongoDB ObjectIds and the filename segment was ignored, an attacker could enumerate and read every uploaded file without authentication.
Originally disclosed on HackerOne
- Triaged in 28 days
- Fixed in 55 days
- Disclosed after 55 days
Summary by the program
Protected file downloads at /file-upload/:fileId/:name authorize livechat access using rc_room_type=l with rc_rid+rc_token, but the authorization path does not verify that rc_rid matches the requested file's rid. Furthermore, :fileId is predictable via sequential MongoDB IDs, and :name can be anything, allowing unauthenticated discovery of all uploaded files.
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
The authorisation check validated the livechat token and room type but failed to compare the supplied room ID against the file's owning room ID, and file identifiers were predictable sequential MongoDB ObjectIds.
Impact
An unauthenticated attacker could read every uploaded file by enumerating predictable file IDs, limited only by the need to supply some valid livechat room credentials.
What the attacker needed
Valid livechat room credentials; predictable sequential file IDs
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 website stored uploaded files and let people download them by visiting a link containing a file ID and a name. It tried to check that the visitor belonged to the right chat room, but it only checked that the visitor had some valid chat credentials, not that those credentials belonged to the room that owned the file. Since file IDs were simple increasing numbers, anyone could guess them and download other people's files.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.