Millions of people using some of the world's most popular apps may have had their locations leaked in a major hack.