Social networking site Facebook temporarily disabled its chat system after a serious security flaw was revealed, which allowed people to view chats and pending friend requests of their Facebook friends.

The security flaw, discovered on Wednesday by technology website TechCrunch, related to a feature on Facebook that allows users to preview their own privacy settings, telegraph.co.uk reported.

“There is a major security flaw in the site that, with just a few mouse clicks, enables any user to view the live chats of their ‘friends’ Using what sounds like a simple trick, a user can also access their friends’ latest pending friend requests and which friends they share in common. That’s a lot of potentially sensitive information,” the report quoted TechCrunch’s Steve O’Hear as saying.

In a statement, Facebook said: “For a limited period of time, a bug permitted some users’ chat messages and pending friend requests to be made visible to their friends. Our engineers promptly diagnosed it and temporarily disabled the chat function. We also pushed out a fix. Chat will be turned back on across the site shortly.”

The report said recent changes to the way Facebook shares its user’s information with other users and third parties have drawn criticism from privacy watchdogs and U.S. Senators.