Apple is encouraging people to update their iPhones after research pointed to vulnerabilities in older versions of the iOS operating system.