The bug in the photo reporting tool on the site meant users could access other people’s recently uploaded private pictures.

If users reported a profile picture as “inappropriate” because of “nudity or pornography”, they could see other photos that would normally be hidden, including those of Facebook’s CEO.

Facebook, which has over 800 million users, said the glitch was only live for a short time and has now been fixed.

The problem – and the photos – went viral when software engineer Mike Rundle from Raleigh, North Carolina, posted a link to them on photo-sharing website Imgur.

Mark Zuckerberg and chicken

Rundle said he’d seen them already on a discussion on Hacker News, an online forum.

Photos of the 27-year-old, who is worth $17.5billion, show him hanging out with friends at home and out in restaurants.

Many of the photos show Zuckerberg’s long term girlfriend, Priscilla Chan, and their puppy.

Mark Zuckerberg and puppy

A developer on Hacker News said: “If that doesn’t prove that [Facebook’s] developers aren’t thinking about security, I don’t know what would. Nobody who is in a culture of protecting security would even consider building this.”

A facebook spokesman said: “We discovered a bug in one of our reporting flows that allows people to report multiple instances of inappropriate content simultaneously.

“The bug, was a result of one of our most recent code pushes and was live for a limited period of time. Not all content was accessible, rather a small number of one’s photos.

“Upon discovering the bug, we immediately disabled the system, and will only return functionality once we can confirm the bug has been fixed.

“The privacy of our user’s data is a top priority for us, and we invest lots of resources in protecting our site and the people who use it.”