The Loud Failure How A Broken Websocket Leaked A Master Key To The Backend
A malformed search filter caused the frontend to fail opening a WebSocket, and the error logged the full connection URL including an active access token. That token was not scoped to the user, so it could authenticate to the third-party messaging provider's REST API and list all internal channels and platform-wide statistics.
๐ฏ๐๐๐๐ฎ๐๐๐๐ Follow
Published on infosecwriteups.com
In bug bounty hunting, we often spend a lot of time looking for complex injection flaws or deep architectural logic errors. But sometimes, the most critical vulnerabilities present themselves when an application simply breaks down and talks too much.
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 client-side token was issued with global rather than per-user permissions, and it was placed in the WebSocket URL where a failed connection logged it in plaintext.
Impact
An attacker with the leaked token could enumerate all real-time channels across the platform and potentially subscribe to them, which could expose administrative broadcasts and private user notifications.
What the attacker needed
Ability to trigger a failed WebSocket connection; access to browser developer console or logs; no account needed to read the leaked token
The fix
The token should be scoped to only the user's own channels and denied access to administrative endpoints, and tokens should not be placed in WebSocket URL parameters; the report says the issue was fully patched.
How it was found
- Inject a malformed filter value into the search URL to break the frontend state.
- Observe in the browser developer tools that the WebSocket connection fails and the full URL with the access token is logged.
- Copy the leaked token and send it to the messaging provider's time endpoint with browser-like headers to confirm it is valid.
- Request the channels endpoint with the same token to list all internal channels.
- Request the stats endpoint to confirm platform-wide analytics are also accessible.
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 persistent two-way connection a web page keeps open with a server, often used for live updates. Here, breaking the page's search filter made that connection fail, and the error message printed the connection address, which contained a secret login token. That token turned out to work for the whole platform's messaging backend, not just the one user, so anyone who saw it could read internal channel lists and statistics.
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.