Facebook on Friday said its internal team had discovered a photo API bug that may have allowed third-party user apps access to photos of 6.8 million users. The social media giant said it had rectified the breach that occurred for 12 days between September 13 and September 25, 2018.

The firm apologised for the failure. “When someone gives permission for an app to access their photos on Facebook, we usually only grant the app access to photos people share on their timeline,” the statement said. “In this case, the bug potentially gave developers access to other photos, such as those shared on Marketplace or Facebook Stories. The bug also impacted photos that people uploaded to Facebook but chose not to post.”

The company said 1,500 apps built by 876 developers were also affected. “The only apps affected by this bug were ones that Facebook approved to access the photos API and that individuals had authorised to access their photos,” the statement said.

Facebook said it is working on tools to help app developers detect the bug and that it will send affected users a notification about measures they can take. “We will be working with those developers to delete the photos from impacted users,” the firm said.

The bug is the latest among several breaches at the platform. In May, Facebook Chief Executive Officer Mark Zuckerberg had apologised to the European Parliament for a data breach scandal which led to 87 million people’s details being compromised. Zuckerberg also apologised for failing to control fake news on his social media platform.