UPDATE: iOS releases 4.0.2 and 3.2.2 close this hole as of Aug 11 2010. No fix for 2G models still in service ( serveral million? ).
New jailbreak via jailbreakme.com ( not a link because it opens directly to jailbreak site ) exploits what appears to be a global hole in PDF viewer on the iPhone, iPod touch, and iPad. While the jailbreak itself may be safe to run, the exploit could be used to execute malicious code. A quick test showed that when emailing myself a PDF file of this style, it was executed just upon viewing the email ( see link below ). Apple will have to issue a fast patch on this and in the mean time, setting the preview to none may help. This could be a disaster if it is the top email in your inbox, in which case it executed when the email is previewed upon opening. Please let me know if you find a way to disable PDF preview or opening.
To be clear, in order to execute the code, it does not require a phone to be jailbroken. It also appears to work in almost every common version of Apple iOS, not simply the newest one. The only good news is that it does not automatically execute in every version, some have to be clicked. Unfortunately, if a user thinks they are just opening a PDF document, this does not seem to be much of a barrier.
How the jailbreak triggers behind the scenes : <a href="/iPhone1,x_4.0.1.pdf">iPhone1,x_4.0.1.pdf</a></span></p> <p>If I was more creative, I could probably do somethign nefarious to my iDevices. What is scary is that it works via Safari or email. In email it apparently <em>only has to preview the PDF</em> to execute the code. Here is a quick <a href="http://www.youtube.com/watch?v=0lqrZ497fEc" target="_blank" title="tapping email with PDF reboots the ipad">video showing an example. It seems to be in the PDF viewing itself and not something new that was added via iBooks. More info as I discover it.
Ok so found it documented here from the people who released the jailbreak. They show a way to close the exploit until Apple releases a patch or workaround. Here's the irony, you can only apply the fix if you jailbreak your device ( recent favorable opinion on jailbreaking ). Also, when Apple releases the update, it will likely require you to update the software, so you may be forced to go to a version you are not keen on. Alternatively, you could just not open any emails or click any links. Good luck with that.
Corporate IT administrators may want to think about quarantine on all PDF attachments and blocking direct PDF links to iPhones via centralized web proxy. This does not, however, prevent a user's phone from being compromised via 3G or another network as they roam about.
I didn't know.