Twitter asked its more than 330 million users to change their passwords after it discovered they were being stored “unmasked” due to a bug, although it said there was no indication of breach or misuse.

“When you set a password for your Twitter account, we use technology that masks it so no one at the company can see it. We recently identified a bug that stored passwords unmasked in an internal log,” the microblogging giant explained in a blog post.

“We found this error ourselves, removed the passwords, and are implementing plans to prevent this bug from happening again,” it added.

In a tweet it said that as a precaution, users should change other passwords as well if they had used the same one as their Twitter account.

The company did not reveal how many passwords were affected. A source told Reuters the figure was a substantial one and that passwords were left exposed for several months.

The breach comes as regulators globally scrutinise how companies store and use consumer data. The European Union will soon enforce the General Data Protection Regulation, which will include high fines for violators.