Apple has released a new version of its mobile operating system, fixing a serious security flaw that allowed App and in-App purchases to be made without proper authorisation.