Apple’s iOS 4.1 for iPhone 4, 3GS and 3G has a bug which can bypass the lock screen and grant anyone access to your contacts. This gives access only to the phone app on your iPhone so no other functions can be used. In order to bypass the lock screen all you have to do is attempt an emergency call, enter any random number and then quickly hit the sleep/wake button.
The home button and the sleep/wake button remain unusable once you bypass the lock screen with this method however, you can browse the contacts, access visual voicemail or make a call using the keypad.
Apple will most probably fix this bug with the final release of iOS 4.2. Check out the video below to see the software glitch.