Many people have not tried jailbreaking their iPhones because they have heard horror stories about the possibility of obtaining a virus or worm or even completely breaking the phone. Are these real concerns that you should worry about? Jailbreaking is a completely safe process however if you do not take certain precautions it does make the iPhone more vulnerable to viruses and worms.
The best way to protect your phones security is to change the SSH password. You can even disable SSH for even better protection. Apple has warned in the past that jailbroken iPhone have been the only ones attached by worms. Apple tries to discourage jailbreaking by planting the seeds of doubt and fear into the vulnerabilities of jailbroken iPhones.
However you are able to protect your iPhone by changing the root password default of “alpine” to another password. If you omit doing this step after you jailbreak your iPhone you will risk being attached by worms, viruses and other types of spyware hacks. If you changes this default password your iPhone will be as safe as any stock phone you can buy from Apple.
With all the added benefits you gain when you jailbreak including the ability to truly multitask and use many apps on the 3G network that is currently restricted there are so many more benefits than risks. Just be sure to change this password and do any other precautionary steps recommended by your jailbreaking software vendor.