Mark Zuckerberg has finally broken five days of silence on misused data from more than 50 million Facebook accounts, a controversy that's consumed the social network over the past week.

Facebook's chief executive said the company is taking actions to make sure the Cambridge Analytica data exploit doesn't happen again. For starters, Zuckerberg said Facebook will "investigate" all apps that have access to large amounts of data, and restrict developers' data access even further.

James Martin/CNET

"We have a responsibility to protect your data, and if we can't then we don't deserve to serve you," Zuckerberg wrote in a post on his Facebook page. "I've been working to understand exactly what happened and how to make sure this doesn't happen again."

The statement is Zuckerberg's first public comment since the controversy began to unfold late last Friday. Facebook disclosed that information from millions of accounts on the social network was used without people's permission by Cambridge Analytica, a digital consultancy hired by the Trump presidential campaign.

According to Facebook, the data was originally collected by a Cambridge lecturer named Aleksandr Kogan for a personality quiz app. He collected the data legitimately, but then violated Facebook's terms by passing the information to Cambridge Analytica.

Facebook found out about the infraction in 2015 but didn't inform the public. Instead, the company demanded that all the parties involved destroy the information. But now there are reports that not all the data was deleted. Zuckerberg said Wednesday that Kogan's app was installed by 300,000 people. That gave Kogan access to their friends' data, too, affecting tens of millions of users. According to The New York Times, that number could be as high as 50 million.

"This was a breach of trust between Kogan, Cambridge Analytica and Facebook," Zuckerberg said. "But it was also a breach of trust between Facebook and the people who share their data with us and expect us to protect it. We need to fix that."

In a separate post, Facebook COO Sheryl Sandberg echoed Zuckerberg's comments. "We know that this was a major violation of peoples' trust, and I deeply regret that we didn't do enough to deal with it," she said.

Facebook has come under fire from lawmakers calling for Zuckerberg to answer for Facebook's actions. Prominent senators, including Democrats Amy Klobuchar and Mark Warner, have called for the CEO to testify before Congress. The US Federal Trade Commission is reportedly launching a probe into Facebook. The European Union has also launched an investigation.

But as criticism continued to mount, Zuckerberg and Sandberg remained quiet. The lack of response from Facebook's leadership only intensified the backlash.

As the days piled up without a response from Zuckerberg, the hashtag #WheresZuck began to circulate on Twitter. At an internal question and answer session at Facebook headquarters on Tuesday, Zuckerberg and Sandberg were reportedly absent as the company addressed its employees about the controversy for the first time. Instead, the session was led by Facebook attorney Paul Grewal.

On Wednesday, Zuckerberg outlined specific changes Facebook would make to the platform. For Facebook users, if you haven't used an app in three months, Facebook will automatically remove access to your data. When you sign in to apps, you'll also give developers less of your personal information -- only your name, email and Facebook profile photo. The company will also start presenting users with a tool at the top of their news feeds that shows them what apps they've been using so they can more easily manage their data settings.

In addition, Facebook will audit any app it suspects of suspicious behavior. If developers don't agree to the audit, they'll be banned from the platform. Developers will also have to sign a contract in order to ask people for access to their data.

Sue Desmond-Hellman, Facebook's lead director, said in a statement that Zuckerberg and Sandberg "know how serious this situation is," and are working with the rest of Facebook's leadership to build stronger user protections. "They have built the company and our business and are instrumental to its future."

While Zuckerberg didn't directly apologize, he did discuss his responsibility and start the process of convincing us that Facebook will learn from this mess and change.

"I started Facebook, and at the end of the day I'm responsible for what happens on our platform," Zuckerberg wrote. "We will learn from this experience to secure our platform further and make our community safer for everyone going forward."

Zuckerberg will be interviewed on CNN on Wednesday night at 6 p.m. PT to discuss the controversy further.

Here's the complete text of Zuckerberg's post:

I want to share an update on the Cambridge Analytica situation -- including the steps we've already taken and our next... Posted by Mark Zuckerberg on Wednesday, March 21, 2018

First published March 21 at 12:48 p.m. PT.

Update at March 21 at 5:58 p.m. PT: Adds Facebook board member comment.

iHate: CNET looks at how intolerance is taking over the internet.

Special Reports: CNET's in-depth features in one place.