Adverts on Yahoo’s homepage were infected with malware designed to mine the Bitcoin virtual currency, according to security experts.
Yahoo confirmed that for a four-day period in January, malware was served in ads on its homepage.
Experts estimate that as many as two million European users could have been hit.
Security firm Light Cyber said the malware was intended to create a huge network of Bitcoin mining machines.
“The malware writers put a lot of effort into making it as efficient as possible to utilise the computing power in the best way,” Light Cyber’s founder Giora Engel told the BBC.
Bitcoin mining malware is designed to steal computing power to make it easier for criminals to accumulate the virtual currency with little effort on their part.
“Generating bitcoins is basically guessing numbers,” said Amichai Shulman, chief technology office of security firm Imperva.
“The first one to guess the right number gets 25 bitcoins and if you have a large volume of computers guessing in a co-ordinated way then you have a more efficient way of making money,” he added.
Other than a computer running slower, victims will be unaware that their machine is being used in what could become known as a “bitnet”.