How I Found a Simple Broken Access Control Bug in a Chat Applicat
A chat platform's API accepted messages to a private channel from a user who had been removed from that channel, because the backend only checked that the channel identifier was valid and not that the sender was still a member. A removed user could therefore keep posting into a private channel they no longer belonged to.
During a security testing of a chat feature on a target, I discovered a simple but impactful Broken Access Control (BAC) vulnerability.
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 message-sending endpoint authorised requests based only on a valid channel identifier and did not verify that the requesting user was still a member of that channel.
Impact
A removed user could continue sending messages into a private channel, undermining the expectation that access is revoked and potentially disrupting or influencing sensitive conversations.
What the attacker needed
A free account; a second account; ability to capture and replay requests
The fix
The backend should check on every message-send request that the authenticated user is still a current member of the target channel; the text says the company acknowledged the issue but does not state that it was fixed.
How it was found
- Create a private channel using one account.
- Add a second account to the channel.
- Send a message from the second account and capture the request.
- Remove the second account from the channel.
- Replay the captured request and observe that the message is still accepted.
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 should only let people who are currently in a private channel post messages there. The server here checked that the channel existed but forgot to check that the person sending the message was still a member, so someone who had been kicked out could keep posting by resending an old request.
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.