Facebook said to fix OAuth-based account hijacking flaw

The vulnerability could have allowed attackers to steal OAuth tokens and access Facebook account, a researcher says

Facebook has patched a serious vulnerability that could have allowed attackers to easily gain access to private user account data and control accounts by tricking users into opening specifically crafted links, a Web application security researcher said late Thursday.

Nir Goldshlager, the researcher who claims to have found the flaw and reported it to Facebook, posted a detailed description and video demonstration of how the attack worked on his blog.

The vulnerability would have allowed a potential attacker to steal sensitive pieces of information known as OAuth access tokens. Facebook uses the OAuth protocol to give third-party applications access to user accounts after users approve them. Each application is assigned a unique access token for every user account.

Goldshlager found a vulnerability on Facebook's websites for mobile and touch-enabled devices that stemmed from improper sanitization of URL paths. This allowed him to craft URLs that could have been used to steal the access token for any application a user had installed on their profile.

While most applications on Facebook are third-party apps that users need to manually approve, there are a few built-in applications that are pre-approved. One such application is Facebook Messenger; its access token doesn't expire unless the user changes his password and it has extensive permissions to access account data.

Facebook Messenger can read, send, upload and manage messages, notifications, photos, emails, videos, and more. The URL manipulation vulnerability found on m.facebook.com and touch.facebook.com, could have been exploited to steal a user's access token for Facebook Messenger, which would have given the attacker full access the account, Goldshlager said.

The attack URL could have been shortened with one of the many URL shortener services and sent to users masquerading as a link to something else. The attack would also have worked on accounts that had Facebook's two-factor authentication enabled, Goldshlager said.

With the access token and the Facebook user ID, an attacker can extract information from the user account by using the Graph API Explorer, a tool for developers available on Facebook's site, Goldshlager said Friday via email.

According to Goldshlager, the Facebook Security Team fixed the vulnerability. "Facebook has a professional security team and they fix issues very fast," he said.

Facebook did not immediately respond to an inquiry sent Friday seeking information on whether the vulnerability had been exploited for malicious purposes before or after Goldshlager found it and reported it. The company lists Nir Goldshlager on their "Thank You" page for whitehat security researchers for 2013.

The researcher claims that he also found other OAuth-related vulnerabilities that affect Facebook, but declined to reveal any information about them because they haven't been fixed yet.

Facebook runs a bug bounty program through which it pays monetary rewards to security researchers who find and responsibly report vulnerabilities affecting the site.

Goldshlager said on Twitter that he has not yet been paid by Facebook for reporting this vulnerability, but noted that his report included multiple vulnerabilities and that he will probably receive the reward after all of them get fixed.

Facebook pays security researchers very well for finding and reporting bugs, Goldshlager said via email. "I can't say how much, but they pay more then any other bug bounty program that I know."

Join the CSO newsletter!

Error: Please check your email address.

Tags patchesInternet-based applications and servicesonline safetysecuritysocial networkingExploits / vulnerabilitiesinternetprivacyFacebook

More about FacebookMessenger

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Lucian Constantin

Latest Videos

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

  • 150x50

    IDG Live Webinar:The right collaboration strategy will help your business take flight

    Speakers - Mike Harris, Engineering Services Manager, Jetstar - Christopher Johnson, IT Director APAC, 20th Century Fox - Brent Maxwell, Director of Information Systems, THE ICONIC - IDG MC/Moderator Anthony Caruana

    Play Video

More videos

Blog Posts