Just after 8 a.m. on Tuesday morning, mobile phones belonging to executives on Apple Inc.’s security team began to ring. WikiLeaks had just published a massive trove of documents, purportedly taken from the Central Intelligence Agency, that described the spy agency’s intrusion capabilities for computers and other gadgets, including iPhones.

Apple engineers quickly began calling colleagues to bring them up to speed on the data dump and to coordinate the company’s response to this new security threat, according to a person familiar...