Twitter has discovered a long-running security flaw that exposed private tweets for some users of the platform on the Android operating system.

The glitch, which was fixed earlier this week, existed for more than four years, according to the tech giant.

“We've become aware of an issue in Twitter for Android that disabled the ‘Protect your Tweets’ setting if certain account changes were made,” the San Francisco-based firm explained, in a statement. “You may have been impacted by this issue if you had protected Tweets turned on in your settings, used Twitter for Android, and made certain changes to account settings such as changing the email address associated with your account between November 3, 2014, and January 14, 2019.”

'COLLECTION #1' BREACH EXPOSES A RECORD 773 MILLION EMAIL ADDRESSES

In its statement, Twitter did not say how many users were affected by the security glitch.

“We recognize and appreciate the trust you place in us, and are committed to earning that trust every day,” it added. “We’re very sorry this happened and we’re conducting a full review to help prevent this from happening again.”

Protected tweets are only visible to a user’s Twitter followers. Users who protect their tweets receive a request when new people want to follow them, which they can approve or deny.

'SOCIAL MEDIA MORONS': FACEBOOK SLAMMED FOR BLOCKING MARDI GRAS CAKE AD OVER 'EXCESSIVE NUDITY'

Users of Twitter on Apple’s iOS operating system or the web were not impacted by the bug, according to Twitter. The company says that the issue was fixed on Jan. 14. “We'll provide updates if other important information becomes available,” it added.

“We've informed people we know were affected by this issue and have turned "Protect your Tweets" back on for them if it was disabled,” Twitter said, in its statement. “We are providing this broader notice through the Twitter Help Center since we can’t confirm every account that may have been impacted. We encourage you to review your privacy settings to ensure that your ‘Protect your Tweets’ setting reflects your preferences. “

CLICK HERE TO GET THE FOX NEWS APP

"We provided this broader notice so anyone potentially affected by this can ensure their privacy settings reflect their preferences," a Twitter spokeswoman told Fox News. "We have notified the account owners that we can confirm were impacted, however, we do not have a complete list of impacted accounts."​​​​​​

Follow James Rogers on Twitter @jamesjrogers