Comex used a PDF exploit to jailbreak iOS 4 on all devices, but evil-doers can also use this exploit to get malicious code into your phone.
You can fix this patch on your jailbroken iPhone by searching/installing "PDF Patch" This way you don't have to update to 4.0.2 and lose all jailbreak options.
(thanks
redmondpie)