Thousands of websites secretly loaded a cryptocurrency miner that preys upon visitors after cybercriminals compromised a third-party library.
Security researcher Scott Helme reported the incident in a blog post that detailed how unknown actors changed one of the script files hosted by Texthelp, a provider of reading-assistive technology. Those malefactors targeted the Browsealoud web screen reader and altered it to include the CoinHive Monero miner.
“The ba.js had been altered to include a document.write call that added a CoinHive crypto miner to any page it was loaded in to,” Helme explained. In total, he found that the incident affected more than 4,000 websites, including many “prominent government websites” in the U.S. and U.K.
Swift Response
Helme reached out to Texthelp following his discovery, and the technology provider responded by temporarily disabling Browsealoud. It also issued a statement informing customers that it had implemented its “data security action plan” after learning of the issue. Texthelp went on to note that it had removed Browsealoud from all customer sites and mitigated any associated risk within four hours.
The U.K.’s Information Commissioner’s Office (ICO) took down its website Feb. 11 after learning it had been affected. The site remained offline the next day while the ICO investigated the incident.
Preventing Cryptocurrency Miner Attacks
The surge of cryptocurrency miner attacks in recent months calls for domain owners to strengthen the security of their websites. According to Helme, they can protect their sites against this particular attack type by adding the SRI Integrity Attribute, which enables the browser to determine whether a file has been modified. If someone has changed it, the browser won’t load the file.
Domain owners can take their website security one step further by implementing the Content Security Policy and the require-sri-for directive, Helme noted. Together, those measures prevent any script from loading on a hosted webpage without an SRI Integrity Attribute.