Twitter suffered several security breaches in 2018, including discovery of a computer virus that left users’ passwords exposed and a security flaw in Twitter’s system that made it possible to identify the country codes of Twitter users’ phone numbers.