Bypassing Enterprise SSO via a Forgotten Source Map: A Bug Bounty
The backend SignalR negotiate endpoint trusted a client-supplied user ID header instead of validating the Azure AD JWT, allowing an attacker to obtain a valid SignalR access token for any user ID. This could let an attacker connect to the real-time backend as any user and eavesdrop or invoke methods.
When you look at a bug bounty scope with 15+ root domains, it’s easy to get overwhelmed. Most hunters will fire off their automated scanners, look for low-hanging fruit like missing security headers, and move on.
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 backend trusted a client-supplied header (x-ms-client-userid) to identify the user instead of validating the Azure AD JWT.
Impact
An attacker could connect to the real-time backend as any user, potentially eavesdropping on data or invoking backend methods, though the text does not confirm actual data access beyond the connection.
What the attacker needed
Knowledge of a valid user ID (UUID); access to the negotiate endpoint
The fix
The vendor patched it by enforcing JWT validation on the /negotiate endpoint and stripping the client-supplied header.
How it was found
- Enumerate subdomains and identify a React SPA embedded in Microsoft Teams.
- Discover a source map file that reveals backend API URLs.
- Inspect the unminified JavaScript to find a custom HTTP client that adds a user ID header to SignalR negotiate requests.
- Send a POST request to the negotiate endpoint with a fake user ID header and no Authorization header.
- Receive a valid SignalR access token for the fake user ID.
- Use the token to connect to the SignalR WebSocket and complete the handshake.
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.
The application used a special header to tell the server who the user was, but the server believed it without checking any login token. An attacker could simply make up a user ID and get a valid connection token, pretending to be that user. This is like a club where the bouncer lets you in if you write your own name on a list, without checking your ID.
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.