Facebook has been caught asking new users for the passwords for their email accounts in order to verify their accounts.

The social media company said it would stop the practice after cybersecurity experts condemned it as "horrible" and "beyond sketchy".

The problem was first spotted by e-Sushi, a well-known but anonymous security pundit, and replicated by reporters for the Daily Beast. New users who appeared to Facebook's systems as suspicious were shown a dialogue box asking them for their email password so that they could verify the address.

A Facebook spokesman said that this screen was only seen by a small number of people and that it was intended to save people an extra step when signing up for a Facebook account.

“These passwords are not stored by Facebook. A very small group of people have the option of entering their email password to verify their account when they sign up for Facebook for the first time.

“People can always choose instead to confirm their account with a code sent to their phone or a link sent to their email.

“That said, we understand the password verification option isn't the best way to go about this, so we are going to stop offering it.”