On Monday, some of the most visited websites on the internet started serving malware to their readers, and none of them had been hacked. CNN, the BBC, Zoom, Fox News, Salesforce, GitLab, HSBC, IKEA and Equifax were all affected, along with more than 160 other organizations, and the malicious code arrived through a service every one of those sites had deliberately trusted. The attack worked because of a flaw in Optimizely, a company that helps businesses test different versions of their web pages, and for most of the day the poisoned code was delivered from Optimizely's own servers with a valid security certificate. If you visited any of those sites on Monday, your browser may have run a stranger's code.
One trusted script, 178 organizations
Optimizely sells A/B testing software, which means its JavaScript runs on the pages of its customers so they can try out different headlines, layouts and buttons on live visitors. That snippet loads from Optimizely's own content delivery network, so when an attacker got code into it, the code went everywhere Optimizely goes. Security researcher Scott Helme and his team at Report URI found the injected code after checking 1,611 Optimizely scripts, and 188 of them carried it, spread across 178 organizations. The BBC's snippet was clean at 02:21 UTC and poisoned by 04:21, with the main payload loading by 08:28. BleepingComputer checked the findings independently against urlscan.io records and confirmed the script loaded or tried to load on Zoom, KLM, GitLab, the BBC, CNN, Salesforce and others. Helme has said the real number of affected sites is probably higher, since his team could only examine the scripts it could find.
The code itself was a busy little thief. It swapped cryptocurrency wallet addresses shown on a page for addresses controlled by the attacker, so anyone sending crypto would send it to the wrong place. It watched payment forms and grabbed card details typed into them, stole cookies, took screenshots of pages, and tried to push iPhone and iPad visitors toward exploit kits called Coruna and DarkSword, which target older versions of iOS. The wallets tied to the attack had received about $7,040 in cryptocurrency by 19:25 UTC on Monday, according to Report URI. Nobody knows yet how many cards were exposed, how many visitors were affected, or whether any iPhone was actually infected. Helme's preliminary estimate puts exposure at around 34 million page visits, with a wide range of 6 million to 150 million.
How the attacker got in
Optimizely confirmed the incident to BleepingComputer and said an unauthorized party exploited a vulnerability in the account signup flow for its Web Experimentation product, then used it to add malicious JavaScript to customer projects. The company says it blocked the vulnerable path, deployed a fix, removed the injected code from affected projects, ended sessions, revoked tokens and notified the customers involved. The investigation is still going. The cleanup moved fast once the problem was spotted: by 21:52 UTC on Monday only one of the 188 infected scripts still carried the code, and Malwarebytes reported that Report URI's monitoring found all the infected files clean by 23:11 UTC and staying clean since. One Smartsheet script was reportedly re-infected after the first cleanup, which shows how hard it is to be sure the mess is fully cleared.
What Optimizely has not explained yet is the part that should concern anyone deciding whether to keep trusting it. The company has described the entry point as a flaw in its signup flow, but it has not published a technical account of how that flaw let an attacker write code into customer projects. The affected companies did not have their own systems broken into, and that is exactly the point. A supply-chain attack does not need to break into 178 companies when it can break into the one service they all share. Every affected site had decided Optimizely's code was safe to run in its visitors' browsers. That decision was the vulnerability.
What to do if you visited one of those sites
If you browsed CNN, the BBC, Zoom, Salesforce or any of the other affected sites on Monday, the sensible move is to check your bank and card statements for charges you do not recognize, and to keep checking them for a while, since stolen card details are often used quietly and later. If you sent cryptocurrency from a page on one of those sites, check that the address you sent it to is the one you intended. Apple users should update their iPhones and iPads to the latest version of iOS, since the exploit kits in this attack targeted older versions. Report URI has published the full list of affected organizations. Most visitors will have been fine, but the exposure window ran for most of the day and the code was designed to steal silently.
This is the kind of attack that should change how companies think about the third-party scripts on their pages, because on Monday the risk showed up all at once. A testing tool is not supposed to be a security boundary, yet for 178 organizations it became one, and the boundary failed. The code is gone and Optimizely says the flaw is fixed, but how it happened, how many people were exposed and who was behind it are still open questions. Until those have answers, the lesson is a simple one: the sites you trust can still serve you someone else's code, and the only warning you get is the one that comes after.
---------------
Author: Ryan Gardner
Silicon Valley News Desk