Facebook is scrambling to fix a bug in its website that could be misused by spammers to harvest user names and photographs.
It turns out that if someone enters the e-mail address of a Facebook user along with the wrong password, Facebook returns a special "Please re-enter your password" page, which includes the Facebook photo and full name of the person associated with the address.
The feature helps people understand if they've mistyped their e-mail address at login, but it could be misused by spammers to get information on Facebook's 500 million users.
A spammer with an e-mail list could write a script that enters the e-mail addresses into Facebook and then logs the real names. This could help make a phishing attack more realistic, said Atul Agarwal, the researcher who posted a note about the issue (along with a sample script that could harvest names) to the Full Disclosure mailing list on Tuesday.
Someone could also use the feature to generate random email addresses and check to see if they really worked, Agarwal said.
The login page shows images of people, even when they've properly set their privacy settings to keep this information private, said Agarwal. "Harvesting this data is very easy," he said.
Facebook blamed the issue on a recently introduced bug.
"We have technical systems in place to prevent people's names and photos from showing to unrelated users upon login, but a recently introduced bug temporarily prevented these from working as intended," a company spokeswoman said in an e-mail message. "We are already working on a fix and expect to remedy the situation shortly."
Scraping Facebook for this type of information is prohibited, she added.
Scammers have taken a special interest in Facebook over the past few years, and criminals such as the people who wrote the Koobface worm may well take an interest in the bug, said Roger Thompson, chief research officer with antivirus vendor AVG.
"I would expect that the Koobface gang will be racing to try to take advantage of this before Facebook patches it," he said via instant message. "It'll be interesting to see who wins."