A malfunction in Apple's mobile operating system could have caused millions of iPhone and iPad users to be affected by hackers.

Research published by ZecOps, a mobile security firm, said a virus in the Mail app made devices sensitive to sophisticated attacks.

The firm said it had "high confidence" that the virus was used to exploit at least six high-profile victims.

ZecOps reported the mistake made by Apple in March. The tech giant had never been aware of this before.

To exploit this shortcoming, hackers would send an empty message to a Mail account of an iPhone or iPad user, the email app on iOS devices. When the email was opened, the user would be forced to restart the phone. During the reboot, hackers would be able to retrieve the information over the phone.

What makes this attack different from other 'hacks' is that users do not need to download any external software or visit a website that contains malware.

The researchers said that this method can also be used in the latest versions of iOS. Apple products are usually considered safer than other mobile devices. Experts say this shows how difficult it can be to detect weaknesses in this firm.