Twitter asks users to change passwords after bug exposed them on internal log

Twitter today asked all of its users to consider changing their passwords after discovering a bug that caused them to be stored "unmasked in an internal log."

According to Twitter, the bug has been corrected and it has seen "no indication of breach or misuse by anyone" after an investigation.

We recently found a bug that stored passwords unmasked in an internal log. We fixed the bug and have no indication of a breach or misuse by anyone. As a precaution, consider changing your password on all services where you've used this password. https://t.co/RyEDvQOTaZ

The bug itself is related to the hashing function Twitter uses to mask passwords. Twitter says passwords were written to an internal log before the hashing process was completed, leaving them exposed. From Twitter:

We mask passwords through a process called hashing using a function known as bcrypt, which replaces the actual password with a random set of numbers and letters that are stored in Twitter's system. This allows our systems to validate your account credentials without revealing your password. This is an industry standard.

Due to a bug, passwords were written to an internal log before completing the hashing process. We found this error ourselves, removed the passwords, and are implementing plans to prevent this bug from happening again.

Out of caution, Twitter users should reset their password for the service, as well as those for any services using the same password. Now would also be a good time to start using two-factor authentication if you aren't already.