Bypassing AI Chat Privacy: How a BOLA Vulnerability Exposed Priva
A secondary endpoint for labelling messages lacked object-level authorization, so an authenticated attacker who knew a message identifier could change another user's message label and receive the full private message content in the response. This allowed disclosure of private AI roleplay chats and tampering with rating metadata.
Published on medium.com
Hello, bug bounty hunters and cybersecurity enthusiasts! In this writeup, I want to share a recent Medium-severity finding that earned me a $700 bounty.
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
The message-labelling endpoint did not verify that the requesting user owned the parent conversation before accepting the mutation and returning the message object.
Impact
An authenticated attacker who knows a message identifier could read private, potentially explicit chat content and alter label metadata on other users' messages, though the need for a UUID limits mass scraping.
What the attacker needed
An authenticated account; knowledge of a target message UUID
The fix
The backend should resolve the message to its parent conversation, check that the requesting user is authorised for that conversation, and return an error before processing the mutation or returning any content.
How it was found
- The victim account creates a private conversation with an AI character, which produces a message with a unique identifier.
- The attacker account tries to read the conversation through the normal viewing endpoint and is correctly rejected.
- The attacker sends a label update request to the message-labelling endpoint using the victim's message identifier.
- The server accepts the request and returns the full message object, including the private content.
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.
When you use a website, the server should check that you are allowed to touch each specific item, not just that you are logged in. Here, the main chat-reading page did that check, but a smaller feature for rating messages did not. So anyone logged in who guessed or obtained a message's unique ID could rate someone else's message and, as a side effect, see the private text of that message.
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.