A vulnerability has been detected in the Apple iPhone that could allow an attacker to take control of the handset.

A report by InfoWorld revealed that security researcher Charlie Miller, during a presentation at the SyScan conference in Singapore, showed that an attacker could remotely install and run unsigned software code with root access to the phone.

Miller, a co-author of The Mac Hacker's Handbook, refused to provide a detailed description of the SMS vulnerability due to an agreement with Apple. However, he did explain that the SMS vulnerability would allow an attacker to run software code on the phone that is sent by SMS over a mobile operator's network.

The malicious code could include commands to monitor the location of the phone using GPS, turn on the phone's microphone to eavesdrop on conversations, or make the phone join a distributed denial-of-service attack or a botnet.

Apple is believed to be working on a patch for the vulnerability that it expects to release later this month. Although Miller explained that the vulnerability should be taken seriously, he claimed that the stripped-down version of Mac OS X used in the iPhone makes it more secure than computers running the full-blown operating system.

Patrik Runald, chief security advisor at F-Secure, said: “This is about as bad as it gets as the vulnerability seems to allow unsigned code to run which circumvents a core part of iPhone's security model. It's usually only able to run signed code, i.e. applications that have been approved by Apple. No user-interaction is required which is unlike current mobile malware.”