An Apple spokesman acknowledged that a vulnerability exists in Apple’s software for email on iPhones and iPads and that the company had developed a fix, which will be rolled out in a forthcoming update on millions of devices it has sold globally.