On last Thursday (October 8th 2009) Apple releases their newest iPhone OS. So, it will bringing the current version of the OS to 3.1.2. Three bugs has been fixed with this update. If you like to know what are the updates that has been done on new iPhone OS please click here. Yesterday On the iPhone blog posted a news about releasing a jailbreak called blackra1n for this new Apple OS 3.1.2. This will only work in Windows operating systems and if you already have a unlocked iPhone 3G or 3GS don't use this on them. Do not upgrade to 3.1.2 using iTunes if you want to keep your iPhone unlocked.
You can download the necessary software to do this Jailbreak from here.
Follow these videos carefully and jailbreak your iPhone 3.1.2 Firmware. For unlocked iPhone users have to wait little bit until dev team release their new jailbreak tool.