Looks like Facebook just can't catch a break. After being panned across the world over flawed privacy guidelines that led to Cambridge Analytica scandal, the social media giant is now embroiled in another controversy over privacy glitch.

Facebook detected a bug in the privacy settings that caused messages wall posts and notifications marked private for select audience of close friends and family, posted as public for everyone to view.

For instance, if a person chooses to share a photo with friends only, the audience selector will automatically suggest them to share with friends next time he or she starts a post. And, if shared something publicly last time, it will suggest public the time after.

So, if you had posted a picture on Facebook for public viewing the previous time and next time decide to share a private message or an image only for select group friends, the social media app would automatically suggest you share it in public, if you didn't notice it, you could have unknowingly shared it as public.

It has come to light that more than 14 million users were affected by the aforementioned glitch between May 18 and 22, and Facebook has started notifying the affected people.

This bug occurred as we were building a new way to share featured items on your profile, like a photo. Since these featured items are public, the suggested audience for all new posts – not just these items – was set to public. The problem has been fixed, and for anyone affected, we changed the audience back to what they'd been using before," Erin Egan, chief privacy officer, Facebook said in a statement.

Facebook, privacy, public, posts
A Facebook glitch caused messages, images marked private only for friends got posted as public for everyone on Facebook to seeFacebook Press Kit

On the bright side, the glitch is fixed and Facebook has said that the company will be transparent about how they builds the products and how the users' data might be used – including when things go wrong.

After the Cambridge Analytica data leaks, Facebook has been revamping the privacy guidelines for third-party app developers who release applications on the social media platform, limiting their access to users' data on Facebook.

The social media giant has also implemented guidelines of European Union's General Data Protection Regulation (GDPR) to improve security in its social media website and mobile app including its subsidiary, WhatsApp Messenger.

The company has promised to go an extra mile to secure the privacy of Facebook users in the coming months.

Stay tuned. Follow us @IBTimesIN_Tech on Twitter and on Google News for latest updates on Facebook.