At least 500 million user accounts have been stolen from Yahoo, the company confirmed on Thursday.