Malicious code hidden in Optimizely’s website-testing software ran on the websites of 178 major organisations on 16 November, including the BBC, CNN, Zoom and Salesforce, stealing cryptocurrency payments and card details from visitors. The Optimizely supply chain attack was uncovered by security researcher Scott Helme, whose monitoring service Report URI found 188 infected Optimizely JavaScript files after checking 1,611 scripts used by the platform.

It is a supply-chain attack: the affected websites were not themselves broken into. They all load a small script from Optimizely, a tool companies use to test different versions of their web pages, and an attacker slipped malicious code into that shared script. Because the poisoned files were served from Optimizely’s own domain, cdn.optimizely.com, with a valid Optimizely security certificate, browsers treated them as legitimate.

01. How the Optimizely supply chain attack worked

According to Report URI, the first injection was spotted at 04:21 UTC on 16 November in the BBC’s Optimizely snippet, and the main malicious script was seen running on bbc.com at 08:28 UTC. The campaign ran for roughly 17 hours. By Monday evening UTC most of the code had been removed, and by 21:52 UTC only one infected snippet remained, on TalkTalk’s site.

The injected code loaded an extra payload from an attacker-controlled server and then watched what visitors did in their browsers. It looked for cryptocurrency wallet addresses — for Bitcoin, Ethereum, TRON, Solana, TON, Litecoin, Bitcoin Cash and Dogecoin — in page text, forms, links and the clipboard, and replaced them with addresses controlled by the attacker, so a payment would go to the wrong place. It also read card numbers, expiry dates and security codes typed into checkout forms, and sent page addresses, some browser cookies and screenshots back to the attacker.

On iPhones and iPads, the code tried to load two known iOS attack kits, Coruna and DarkSword, which target older versions of iOS. Researchers have not confirmed that any iPhone was actually compromised.

Other affected sites confirmed by researchers include Fox News, GitLab, IKEA, HSBC, Equifax, Air France-KLM, Ledger, Peacock, KLM, Change.org, Bitly, Smartsheet, Stamps.com, Mutual of Omaha, American Eagle and UNICEF USA. Report URI said the true number of affected organisations is probably higher than 178.

02. What the malware stole

Report URI said that by 19:25 UTC on 16 November, the attacker’s wallets had received about $7,040 in cryptocurrency within roughly nine hours. A later on-chain review by Galaxy Digital’s Alex Thorn put the confirmed stolen total lower, at around $2,300 across 19 fraudulent transactions. Some of the wallets were active before the attack, which makes it hard to say exactly how much was stolen during the campaign itself.

How much card data was taken is not yet known. The researchers said the presence of the script on a site does not mean every visitor was affected, and it is still unclear whether any stolen data beyond the confirmed crypto transactions was taken.

03. What Optimizely has said

Optimizely confirmed to BleepingComputer that attackers exploited a vulnerability in the sign-up process for its Experimentation accounts to inject malicious JavaScript into customer projects. Its status page says the company identified a security incident in which an unauthorised party exploited a vulnerability in Experimentation and used it to add malicious JavaScript to some customer projects, and that it has fixed the vulnerability, removed the injected code from affected projects, secured affected user accounts and put additional protections in place.

The incident was still listed as being monitored on Optimizely’s status page early on Tuesday, 17 November. How the attacker got access in the first place is still unknown, and who ran the campaign has not been identified.

04. What to do if you visited one of the sites

If you visited the BBC, CNN, Zoom, Salesforce or any of the other affected sites on 16 November and entered card details or copied a cryptocurrency wallet address, check your statements and wallet transactions for anything you do not recognise, and report anything suspicious to your bank or card provider. There is no need to change passwords unless you entered them on an affected page, but it is worth watching for unfamiliar transactions over the next few days.

Organisations that use Optimizely Web should check every project’s JavaScript and every experiment’s custom code for anything they did not write, including references to 1688360.cc, the domain the malicious payload was loaded from. Report URI has advised customers to look for that domain and for suspicious uses of atob( in their code.

The attack is a reminder of how much of the web depends on a small number of shared suppliers. One compromised vendor was enough to put malicious code in front of visitors to some of the world’s most-visited websites, without any of those sites being hacked themselves. A similar large-scale disruption hit US banking customers earlier this month, when Chase, Bank of America and Wells Fargo customers were locked out of their accounts.

Sources: BleepingComputer, Optimizely status page, Report URI via ShiftDelete. Readers can also follow our technology coverage for more.