Today Apple released iOS 4.0.2 for iPhone 3G, 3GS, and iPhone 4 (iPod touch 2G/3G too).
This is a minor update to firmware 4.0 that addresses a recent security vulnerability in the way Safari handles PDF files.
iOS 4.0.2 also patches the JailbreakMe.com browser hack.
Below are the updates in firmware 4.0.2:
Fixes security vulnerability associated with viewing malicious files PDF files.
iOS 4.0.2 is available now in iTunes.
Remember, if your iPhone is jailbroken and/or unlocked or you are thinking about jailbreaking and/or unlocking your iPhone, you should not immediately update to 4.0.2, as you may lose the ability to jailbreak and unlock.