Facebook has admitted a bug made private posts visible to the whole internet.

Last week, it was revealed that a glitch in Facebook automatically made some posts public – even though users had opted to remain private.

It affected up to 14 million people between May 18 and 27. Facebook has just written to users to warn them of the glitch.

‘Please review your posts,’ Facebook wrote in its alert.

‘We recently discovered a technical error between 18 and 27 May that automatically suggested a public audience when you were creating posts.

‘We apologise for this mistake. The problem has been fixed and we’ve changed the audience any posts you made to what you had been using before, just in case.

‘You can go to your activity log to review the posts you made during this time.’

The bug is believed to have occurred while Facebook was testing a new feature.

The bug could ruin the lives of anyone whose private posts suddenly reached a public audience.

Last year, Harvard University rescinded offers for at least 10 students over ‘obscene memes’ posted to a private Facebook group.

In the chat group, the incoming undergraduates sent each other offensive pictures and jokes that mocked sexual assault, ethnic minorities and the Holocaust.