Skip to content
IDOR Write-up Beginner

Exploiting WebSocket Information Disclosure to Achieve Account Deletion (IDOR)

The application sent a WebSocket message to every connected client listing all online users with their user IDs and email addresses, and the account deletion endpoint accepted a user-supplied ID without checking ownership. An attacker could therefore delete any real user's account by taking an ID from the leaked list and sending it in the delete request.

waleedosamaeg Follow

Published on waleedosamaeg.medium.com

Hello, my hacker friends 👋 Welcome to a new write-up covering a newly discovered vulnerability in a chat website.

Waleed Osama, on waleedosamaeg.medium.com

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 broadcast a full online-user list to every client and the delete endpoint authorised only on the client-supplied user ID rather than the caller's session.

Impact

An attacker could delete arbitrary real user accounts without authentication or authorisation, causing data loss and service disruption; guest accounts were rejected by the server.

What the attacker needed

No account needed to read the WebSocket; victim must be online to appear in the list; attacker needs a valid user ID from the leak

How it was found

  1. Browse the chat site as a guest and note that HTTP requests carry no session cookie or token.
  2. Create an account, log in, and confirm requests still carry no authentication.
  3. Open the WebSocket tab in the proxy and observe the server-to-client messages.
  4. Find the update_users message containing all online users' IDs and emails.
  5. Intercept the delete-account request and replace the user ID with one from the leaked list.
  6. Send the request and observe the target account being deleted.

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 WebSocket is a two-way connection a website keeps open with the server, and here the server used it to broadcast a list of everyone online, including their IDs and emails. Separately, the 'delete my account' request trusted whatever user ID the browser sent, so anyone could swap in someone else's ID. This kind of flaw, where changing an identifier lets you act on another person's data, is called an IDOR (insecure direct object reference).

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.

More by waleedosamaeg

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

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.