Apple is urging users to update their software on most devices after discovering a possible security vulnerability.