Apple has issued an immediate warning to iPhone users after uncovering the biggest hack in its history that went undetected for five years.

An Israeli cyber arms firm, NSO Group, has developed a hack called Pegasus that has been hacking into devices for nearly half a decade, potentially exposing the personal information of millions of users.

Apple has announced that it will warn consumers who have been the victims of a major cyber attack.

Pegasus was built in 2016 and the highest bidder was auctioned off – which included governments and nation-states.

Powerful software is capable of infecting both iPhone and Android devices so that hackers can extract messages, photos and emails, record calls and secretly activate microphones and cameras.