A Facebook bug briefly unblocked people on Messenger who had previously been blocked, opening the door to unwelcome messages and exposing otherwise hidden posts, the company said Monday.

The bug affected up to 800,000 users and has since been fixed, the company said. But it's yet another privacy misstep for the social media company, which has been owning up to its errors with increasing frequency in recent months.

"We know that the ability to block someone is important — and we’d like to apologize and explain what happened," chief privacy officer Erin Egan said in a blog post.

Blocking someone on Facebook means the person cannot see any of the user's posts or start conversations on Messenger. But the bug, which was active between May 29 and June 5, allowed previously blocked users to see posts shared with wider audiences (like friends of friends) and to message the user who had blocked them.

In most cases, the bug only unblocked one person on a user's blocked list, Facebook said. Affected users will see a Facebook notification encouraging them to check their blocked lists.