Security Experts:

Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Vulnerabilities

Facebook Flaws Allowed Attackers to Delete Users’ Comments

A combination of vulnerabilities could have allowed a malicious hacker to delete any comment on Facebook, according to a researcher.

A combination of vulnerabilities could have allowed a malicious hacker to delete any comment on Facebook, according to a researcher.

Joe Balhis, a 19-year-old researcher from Lebanon who has been working with Germany-based Vulnerability Lab, discovered that he could remove comments posted by users on Facebook by leveraging a session validation flaw and a cross-site request forgery (CSRF) vulnerability.

An advisory published by Vulnerability Lab shows that an attacker could have deleted any comment simply by replacing the values of the comment_id and legacy_id parameters in a request.

The first step of the attack involved posting a random comment on Facebook, deleting it, and capturing the header information from the delete request. In the next phase, the attacker likes the comment he wants to remove, and captures the request in order to obtain the value of the comment_id and legacy_id associated with the targeted comment.

Finally, the attacker sends a comment delete request to Facebook in which the values of the comment_id and legacy_id parameters are replaced with the ones of the targeted comment.

A malicious hacker could have created a script to automate the attack and delete a large number of comments by guessing comment_id values, Balhis told SecurityWeek.

“If I entered a random id and it was the id of an existing comment, it would be deleted permanently,” the expert said.

The issue was reported and patched in 2014, but the researcher decided not to release the details of the vulnerability until now. Facebook awarded Balhis a $12,500 bounty.

Before the social media giant addressed the issue, there was no way for users to protect themselves against such attacks, Balhis said.

“The victim (target) user account can’t do anything. He can’t protect his comments. I need his comment id and it is easy to get [from] the source of Facebook,” the researcher explained via email. “Ever when you visit a Facebook post you can see in the source of the site the user specific comment ids.”

The expert noted that a malicious actor did not require access to the victim’s profile. The attack worked even against users who were not friends with the attacker, and users with private profiles.

A proof-of-concept video that shows the attack step by step has been made available by Vulnerability Lab.

Last week, researcher Laxman Muthiyah reported getting a $12,500 bounty from Facebook for identifying a Graph API vulnerability that could have been exploited to delete users’ photo albums.

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.

Application Security

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

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Vulnerabilities

A high-severity format string vulnerability in F5 BIG-IP can be exploited to cause a DoS condition and potentially execute arbitrary code.

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.

Vulnerabilities

GoAnywhere MFT users warned about a zero-day remote code injection exploit that can be targeted directly from the internet