A security flaw in Apple Inc.’s operating system has given hackers control of over 18,000 Mac computers, in what may be the biggest threat to Macs in two years. Most of the infected computers are in the United States.

Russian security company Dr. Web discovered the flaw and published its findings earlier this week

The security hole in Apple's operating system, Mac OS X, is exploited by a virus known as iWorm and specifically designed by hackers to infiltrate Macs. The security firm did not say how it spreads. The software used to take control of Macs, turning them into so-called botnets, or robotic networks that can be used to mine digital currencies like Bitcoin, flood websites with so much traffic that they crash or distribute spam emails.

The hackers programmed the virus to automatically make infected Macs visit Reddit to search for specific comments in its discussion section. The hackers leave server addresses for the iWorm on the site, which it connects to, giving them remote control over the infected Mac.

The hackers have infiltrated thousands of Macs but have not yet utilized the threat, Dr. Web said. They may be waiting until the network is large enough to launch a coordinated attack. The cybersecurity company said the full name of the “complex, malicious program” is Mac.Backdoor.iWorm.

Dr. Web said that its security software for Macs has been updated to protect against iWorm. Representatives from Apple did not respond to a request for comment. 

The iWorm may be the biggest security threat to Macs since 2012, when more than half a million were infected by a malware discovered by Kaspersky Lab, an anti-virus company.