Original URL: http://www.theregister.co.uk/2013/07/25/linkedin_oauth_token_snaffling_vuln/

LinkedIn snaps shut OAuth login token snaffling vulnerability

Just in case anyone wanted to add CEO of Yahoo! to your online CV

By John Leyden

Posted in Security, 25th July 2013 07:27 GMT

Facebook-for-bosses website LinkedIn has fixed a security vulnerability that potentially allowed anyone to swipe users' OAuth login tokens.

The flaw came to light after British software developer Richard Mitchell discovered part of the LinkedIn's customer help website handed out the private OAuth token of the logged-in user. These otherwise secret tokens can be used by anyone to masquerade as LinkedIn users linked to those tokens, and potentially access profile information using APIs.

Before handing over the sensitive data, JavaScript code on the help site merely checked that the previously visited page was served from LinkedIn.com - a trivial HTTP referrer check that can be easily circumvented. Thus, someone could log into LinkedIn and surf to a malicious web page with code embedded to poke the help site for the victim's OAuth token.

"I quickly found a request to a JavaScript file including the API key for the help system which immediately returned an OAuth token for the user," Mitchell explained in a blog post.

"You shouldn’t trust JavaScript or the referrer header exclusively for any kind of authorisation policy."

Losing control of an OAuth token is a great deal less serious than compromised login credentials, but it's still bad news. Fortunately the LinkedIn flaw was identified and responsibly disclosed before any harm came of the bug.

Mitchell privately reported the flaw on 3 July. The social network was able to squash the bug within a couple of days, and sent Mitchell a t-shirt as a small thank you for his efforts. The "fix" involved disabling requests without HTTP referrers, according to Mitchell.

A LinkedIn spokesman confirmed to El Reg that Mitchell's account of the bug find was accurate. "We can confirm that we were notified of the OAuth vulnerability and took immediate action to fix the issue, which was resolved by our team within 48 hours of being notified," he said. ®