Security Experts:

Connect with us

Hi, what are you looking for?



Facebook Pays Out $7,500 Bounty for Account Hijacking Flaw

A researcher has earned a significant bounty after finding a serious cross-site scripting (XSS) vulnerability that could have allowed malicious hackers to take over users’ Facebook accounts.

A researcher has earned a significant bounty after finding a serious cross-site scripting (XSS) vulnerability that could have allowed malicious hackers to take over users’ Facebook accounts.

The XSS vulnerability was reported to Facebook by UK-based security consultant Jack Whitton in July 2015 and it took the social media giant roughly 6 hours to patch it. However, the researcher waited until this week to disclose its details.

The bug bounty hunter told SecurityWeek that he earned $7,500 for responsibly disclosing the issue, an amount confirmed by Facebook representatives.

“As these sort of issues become harder to find on sites which have a mature bug bounty programme (Facebook & Google), the rewards increase quite a lot, which means the payouts are really worth your time,” Whitton said via email.

The researcher’s attack method has two main aspects: one related to content types and a DNS issue.

The expert first attempted to upload a file containing arbitrary HTML code to Facebook. He discovered that in some cases it’s possible to get an uploaded file to be interpreted as an HTML simply by changing its extension to .html.

The extensions of regular photos and videos uploaded to Facebook cannot be modified, but Whitton found that advertising images uploaded via the Ads Manager did not benefit from the same protection.

Using a technique described in 2012, the expert managed to encode an XSS payload into a PNG image’s IDAT chunk. Unlike Exif and iTXt data, which are removed by Facebook from uploaded JPEG and PNG images, IDAT chunks are not.

However, uploading arbitrary code embedded in harmless-looking files is not enough because files are stored on Facebook’s content delivery network (CDN), which is sandboxed. Facebook and other major companies, such as Google, specifically state in their bug bounty program rules that running code on a sandboxed or CDN domain is out of scope.

The good thing about executing code on a Facebook CDN domain is that the associated URL is not verified by the company’s Link Shim system, which checks all external links for malicious content before the browser requests the page.

With his code uploaded to Facebook and with Link Shim bypassed, all the expert needed to do was find a way to move from the CDN hostname to a proper domain. He discovered that the DNS entries for the domain were pointing to the CDN, allowing him to get his payload executed by navigating to the uploaded HTML file on the domain.

The next step was to find a way to make requests to directly, which is normally impossible due to cross-site request forgery (CSRF) protections. However, Whitton found that several Facebook plugins are designed to be placed in an iframe, which bypasses protections. This made it possible for an attacker to steal a user’s CSRF token and make requests on their behalf simply by getting the victim to click on a link.

“In this case, because it’s a client-side issue, an attacker would need to persuade a user to click/visit a link they control,” Whitton said in an email. “This could be by posting a status with the link, or sending an email.”

“This is a bit easier than it sounds, because the URL is a legitimate URL, rather than a suspicious domain. Once they’d clicked it, then the script in the background could do anything with their account – post a status, read private messages. In addition, the script could post a link to itself to the victim’s Facebook account, which could trick their friends into opening it, and so on,” he added.

Whitton noted in a blog post that Facebook quickly addressed the DNS issue, but left the content type weakness unpatched, most likely because it was a low risk flaw on its own. However, Facebook told SecurityWeek that it fixed the content type bug as well.

Related: Facebook, Researcher Quarrel Over Instagram Hack

Written By

Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.

Click to comment

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Expert Insights

Related Content

Cloud Security

VMware vRealize Log Insight vulnerability allows an unauthenticated attacker to take full control of a target system.

IoT Security

Lexmark warns of a remote code execution (RCE) vulnerability impacting over 120 printer models, for which PoC code has been published.

Mobile & Wireless

Apple rolled out iOS 16.3 and macOS Ventura 13.2 to cover serious security vulnerabilities.

Email Security

Microsoft is urging customers to install the latest Exchange Server updates and harden their environments to prevent malicious attacks.

Mobile & Wireless

Technical details published for an Arm Mali GPU flaw leading to arbitrary kernel code execution and root on Pixel 6.

Application Security

Drupal released updates that resolve four vulnerabilities in Drupal core and three plugins.


Security researchers have observed an uptick in attacks targeting CVE-2021-35394, an RCE vulnerability in Realtek Jungle SDK.

Application Security

A CSRF vulnerability in the source control management (SCM) service Kudu could be exploited to achieve remote code execution in multiple Azure services.