Facebook has confirmed it was the victim of a spam attack in recent days that resulted in users’ pages being flooded with graphic images depicting sex and violence.
However, the company said today it had introduced new security measures to eliminate the spam.
In a statement this morning, the social networking site said although it had “eliminated most of the spam”, people needed to remain vigilant to keep their accounts from being hijacked.
“Recently, we experienced a spam attack that exploited a browser vulnerability,” the company said. “Our team responded quickly, and we have eliminated most of the spam caused by this attack. We are now working to improve our systems to better defend against similar attacks in the future."
Facebook said the latest attack tricked users into pasting and executing malicious JavaScript in their browser URL bar, which then caused them to unknowingly share the pornographic content.
It stressed that no “user data or accounts were compromised during this attack”.
The company - which has grown into one of the biggest technology firms in the world in less than a decade - said it had put in place a system which would quickly shut down the malicious pages and accounts that attempted to exploit the vulnerability.
It also said it had put place backend measures to reduce the rate of these attacks and will continue working on finding new ways to protect users.
"Protecting the people who use Facebook from spam and malicious content is a top priority for us," Facebook said.
It warned users never to cut and paste unknown code into their browser's address bar, and to always use an up-to-date browser, as well as to flag and report any suspicious content.
The identity of those behind the spam attack remains unknown.