Apple says it has been hit by hackers who wormed their way into the California company's system but failed to steal any data.
Hackers infected the Macintosh computers of some employees, the company said in an unprecedented disclosure that described the widest known cyber attacks against Apple-made computers to date.
Unknown hackers infected the computers of some Apple workers when they visited a website for software developers that had been infected with malicious software.
Apple did not name the site, but it is understood to be iPhonedevsdk, an online forum for software developers. It is still infected, according to a person with knowledge on the matter. (Do not go to this site unless you want to be infected).
The malware had been designed to attack Mac computers, the company said in a statement.
The same software, which infected Macs by exploiting a flaw in a version of Oracle's Java software used as a plug-in on web browsers, was used to launch attacks against Facebook, which the social network disclosed on Friday.
The malware was also employed in attacks against Mac computers used by "other companies", Apple said, without elaborating on the scale of the assault.
But a person briefed on the investigation into the attacks said hundreds of companies, including defence contractors, had been infected with the same malicious software.
The attacks mark the highest-profile cyber attacks to date on businesses running Mac computers. Hackers have traditionally focused on attacking machines running the Windows operating system, though they have gradually turned their attention to Apple products as the company gained market share over Microsoft.
"This is the first really big attack on Macs," said the source, who declined to be identified because the person was not authorised to discuss the matter publicly. "Apple has more on its hands than the attack on itself."
Charlie Miller, a prominent expert on Apple security who is co-author of The Mac Hacker's Handbook, said the attacks show that criminal hackers are investing more time studying the Mac OS X operating system so they can attack Apple computers.
Sign up for CIO Asia eNewsletters.