When APIs Trust Too Much: Chat Impersonation through Broken Auth [Bug bounty write-up] — Kullai :)
A chat API endpoint trusted the channel identifier supplied in the request, so any member of the organisation could swap in another channel's ID and post messages there. The attacker could also post messages appearing to come from a super admin, impersonating them in a private channel.
Hey everyone, Kullai here! I’m back with another interesting finding this time, it’s a fun one.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server trusted the client-supplied channel ID and sender identity without verifying that the requesting user was a member of that channel or that the sender matched the authenticated user.
Impact
A low-privileged member could read channel identifiers and post messages into a private super-admin channel while impersonating a super admin, undermining the integrity of the chat.
What the attacker needed
A low-privileged account in the organisation; access to the chat feature
The fix
The endpoint was fixed according to the author, though the text does not describe the change; it should verify channel membership and bind the sender to the authenticated user.
How it was found
- Join the organisation as a low-privileged member and open the chat feature.
- Capture the request sent when posting a chat message.
- Replace the channel ID in the request with the secret channel ID of the super admins.
- Send the request and observe the message posted in the super admins' channel, appearing to come from a super admin.
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 write-up has not been written yet. The Original tab links to the source.
A chat app usually checks that you belong to a conversation before letting you post in it. Here the server only looked at the channel number sent in the request and never checked whether the sender was allowed in that channel. By changing that number, a low-privileged user could post into a private admin channel and even make the message look like it came from an admin.
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.