Microsoft has patched a serious authentication vulnerability that could have been exploited to gain access to Outlook, Azure and Office accounts, a researcher reported over the weekend.
The flaw was discovered by UK-based security consultant Jack Whitton, who has taken part in the bug bounty programs of several major companies, including Uber’s recently launched program.
The issue was reported to Microsoft on January 24 and it was patched within two days. Whitton told SecurityWeek that Microsoft paid him $13,000 for responsibly disclosing the security bug.
Microsoft handles authentication for online services like Outlook, Office and Azure via requests to login.live.com, login.microsoftonline.com and login.windows.net. When a user browses to outlook.office.com, for example, they are redirected to a login.microsoftonline.com URL that includes a parameter, named “wreply,” which specifies the domain the user wants to access.
If the user is already logged in, a POST request is sent to the domain specified in wreply with a login token. The domain the user wants to authenticate on consumes that token and the login process is completed.
Whitton discovered that the authentication URL is vulnerable to cross-site request forgery (CSRF) attacks, allowing a malicious actor to create a specially crafted URL, which, when accessed by an authenticated user, would send the login token to a server controlled by the attacker.
The legitimate URL looks like this:
And the attacker could set the redirect to this:
The expert found that this would cause the login token to be sent to the attacker’s website, which in this case is poc-ssl.fin1te.net. Using the token, the attacker could have gained complete access to the targeted user’s account.
“The token is only valid for the service which issued it – an Outlook token can’t be used for Azure, for example. But it’d be simple enough to create multiple hidden iframes, each with the login URL set to a different service, and harvest tokens that way,” Whitton explained in a blog post.
Whitton pointed out that this vulnerability is similar to a CSRF issue reported last year by Wesley Wineberg, senior security research engineer at Synack. The main difference between the flaws is that the one discovered by Wineberg affected Microsoft’s OAuth mechanism, while the one identified by Whitton affected Microsoft’s main authentication system.
Wineberg earned $24,000 for reporting the bug during a period when Microsoft had doubled rewards for vulnerabilities found in login.windows.net, login.microsoftonline.com and login.live.com.
Related Reading: Microsoft Adds OneDrive to Bug Bounty Program