It remains unclear when the hack occurred. However, the company released on Tuesday a patch for the Java script coding in its OS X operating system that seemed to fix the problem.

The security breach echoes a similar hack at Facebook in January, which the social network admitted to in a statement on Friday.

Facebook employees had visited an infected developer site, and the software took hold of their computers.

Both tech giants are the only the latest in a long line of U.S. companies to fall victim to cyber attacks. Twitter, the New York Times and the Wall Street Journal, among others, have all recently said their computers were tapped into.

The newspapers fingered China in the hacking attacks, though the Silicon Valley companies did not mention China by name.

Security company Mandiant published a 60-page report Tuesday linking groups of hackers in China to the government in Beijing, leading to greater fears that the Chinese army is behind many of the recent attacks.