Microsoft CSRF Vulnerability
The Add User Role endpoint on Microsoft's Service Trust Portal accepted a GET request without a CSRF token, so an attacker could add a user to the portal on behalf of an administrator. The author demonstrated this with a simple HTML form that, when visited by an admin, would add a user with the 'User' role.
Published on web.archive.org
{{media:0}}
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 endpoint performed a state-changing action (adding a user role) via a GET request and lacked any CSRF token or origin check.
Impact
An attacker could add a user to the portal with the 'User' role on behalf of an administrator, potentially granting unauthorised access to the portal.
What the attacker needed
Victim is a logged-in portal admin; victim visits attacker-controlled page
The fix
The report states the bug was fixed by Microsoft, though the exact fix is not described; typically this would involve adding a CSRF token and using POST for state-changing actions.
How it was found
- Identify the Add User Role endpoint and note it accepts a GET request with a role parameter.
- Observe that the request contains no CSRF token.
- Craft an HTML form that submits to the endpoint with the desired role.
- Trick an admin into loading the form, which adds the user.
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.
CSRF (Cross-Site Request Forgery) is when a malicious website makes a logged-in user's browser send a request to another site without the user's knowledge. Here, the portal had a page that added users, and it did not check that the request came from its own site. So an attacker could trick an admin into visiting a page that silently added a new user.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.