Facebook temporarily disabled its instant messenger feature on Wednesday while it repaired an apparent security vulnerability that permitted users to spy on friends' chat conversations and view pending friend requests.

The flaw, first reported by TechCrunch, resided in the 'Preview My Profile' control under the social networking site's privacy settings. The control lets users see what their profile looks like to others on Facebook.

However, due to a glitch, users could use the control to view live chats going on between their friends, as well as view their pending friend requests. A video posted on Wednesday to YouTube documents the exploit.

The problem was corrected shortly after Facebook became aware of it, a company spokesman said in a statement sent to SCMagazineUS.com.

"When we received reports of the problem, our engineers promptly diagnosed it and temporarily disabled the chat function," said the spokesman. "We also pushed out a fix to take care of the visible friend requests, which is now complete. Chat is now back up and running."

News of the bug comes as Facebook draws criticism for its recent policy changes that automatically opts in users to share data with some third-party websites. Facebook defends the change as a way for users to better socialise with friends across the internet.

Some security and privacy experts disagree.

"In the past, Facebook has insisted that privacy is its 'highest priority,' but there is growing concern that the site has played fast and loose with the personal information of its 400 million users, encouraging them to share too much private data online and changing privacy settings to be more open," said Graham Cluley, senior technology consultant at Sophos, in a blog post on Wednesday.