Some surveillance experts said this represents the first known case of a U.S. internet company agreeing to a spy agency's demand by searching all arriving messages, as opposed to examining stored messages or scanning a small number of accounts in real time. While Reuters reported it was likely, several email providers and other companies told the Associated Press they have not received such requests.
Yahoo's chief executive, Marissa Mayer made a decision to fully comply with this request and it resulted in Alex Stamos stepping down from his role as chief information security officer.
Yahoo gave a terse, ambiguous statement to Reuters: "Yahoo is a law abiding company, and complies with the laws of the United States".
Stamos, however, declined to comment. However, the Reuters article claimed that Yahoo's alleged email scanning program may have gone far beyond that, allowing the government to search through all of it customers' mail accounts.
Bulk collection of data isn't allowed and the government can not indiscriminately review the emails or phone calls of ordinary people, he said. The company's stock is up more than 29 percent this year. The hidden search was done for a specific but unknown word or phrase.
"It would be really hard for a provider to do that", he added. But none of the companies except Yahoo have claimed that have not received any similar requests for the custom software from the government. It is, therefore, hard to figure out which agency was seeking the information.
Google and Microsoft have both denied receiving conducting similar scans of customer emails.
Google, which runs Gmail, said in a statement that the company never received such a request.
A Microsoft spokesperson did not comment on whether it had received a request, but added: "We have never engaged in the secret scanning of email traffic like what has been reported today about Yahoo".
Facebook also said it would fight such a request should it receive one.
USA law allows the country's intelligence agencies to order the release of customer data that they believe could prevent a terrorist attack, among other reasons.
US authorities have frequently come under fire for violations of citizens' right of privacy in the name of social security.
Companies can challenge such orders behind closed doors in the Foreign Intelligence Surveillance Court.
The news is just the latest email bombshell for Yahoo, which was already reeling from its recent admission that computer hackers swiped personal information from at least 500 million of its accounts. Apple has successfully won the battle against Federal Bureau of Investigation to create custom software to unlock an iPhone linked to the San Bernardino shooting. The FBI dropped the case after it unlocked the phone with the help of a third party, so no precedent was set. Yahoo did eventually comply. That having been said, it seems as if Yahoo assumed this was a fight it wouldn't win according to the four former employees.
So if Yahoo did it, were others also involved in this massive data collection program? Stamos and the security team only learned of the program after testing Yahoo's systems for vulnerabilities and discovering software they thought had been inserted by hackers.