Apple has just released iOS 4.0.2 for the iPhone 4, iPhone 3GS and iPhone 3G along with iOS 3.2.2 for iPad.

iOS 4.0.2 fixes the security vulnerability in iOS 4 and iOS 4.0.1 that was used by JailbreakMe 2.0 – the web-based to jailbreak iPhone, iPod Touch and iPad.

According to the release notes, iOS 4.0.2 and iOS 3.2.2 includes fixes for the security vulnerability associated with viewing malicious PDF files.

Experts had raised concern that the security vulnerability in iOS could be exploited in a similar way by malicious websites to install malware.

If you have or planning to jailbreak and/or unlock your iPhone then you should NOT upgrade to iOS 4.0.2 as you will not be able to use JailbreakMe 2.0 to jailbreak it again.

iPhone Dev Team has also issued a warning:

iOS 4.0.2 is out. Don't accept it! Please wait for further details.

IPlease also remember that by not applying the patch it exposes you to the security hole. So if you plan to wait for iPhone Dev Team or Comex to provide an update then you can install PDF Loading warner – jailbreak app from Cydia to prevent malicious sites from using the security hole.

But if you don’t care about jailbreaking or unlocking your iPhone then you can update your iPhone with iOS 4.0.2 via iTunes.

We’ll let you know as soon as we’ve any further updates. So stay tuned here at iPhone Hacks or follow us on Twitter or subscribe to our RSS feed.