Tipped off by a Mac OS X security expert, Apple is working to repair a serious security flaw in the iPhoneâs operating system â one that could allow an attacker to track the phoneâs location via GPS, eavesdrop on conversations via the microphone, or create a mobile bot net capable of unleashing denial of service attacks.

The attack takes advantage of a vulnerability in the phoneâs short messaging service, or SMS, feature, allowing an outside party into the phoneâs root access without the ownerâs knowledge. Security researcher Charles Miller, co-author of The Mac Hackerâs Handbook, announced his discovery Thursday at the SyScan Conference in Singapore, according to Computerworld.

Apple plans to have the fix released later this month, before Miller gives his scheduled speech at the Black Hat Technical Security Conference in Los Angeles. At the July 25-30 conference, Miller will be joined by Colin Mulliner for a talk entitled âFuzzing the Phone in Your Phone,â which will show attendees how to discover vulnerabilities in a variety of smartphones.

Miller has not specifically detailed how the SMS exploit is done, citing an agreement with Apple. But he will discuss the attack in length at the Black Hat conference.

The exploit takes advantage of the fact that SMS can send binary code to an iPhone. That code is automatically processed without user interaction, and can be compiled from multiple messages, allowing larger programs to be sent to a phone.

For a widely-adopted platform, Appleâs iPhone has had remarkably little in the way of discovered vulnerabilities in its short history. In 2007, a security firm â including Miller â notified Apple of the phoneâs first security flaw, soon after the hardware had been released. It was subsequently fixed by Apple.