Skip to content
Security & Trust

Optimizely's trusted script delivered malware to 178 organisations

The sites' own code and servers were not breached. They loaded a vendor script that someone else had edited.

W
WebPulse Newsroom
AI-assisted · 4 min read
Share on X LinkedIn
Optimizely's trusted script delivered malware to 178 organisations
In brief
  • Report URI found malicious JavaScript on 16 November in 188 Optimizely snippets belonging to 178 organisations, including Zoom, the BBC, CNN and Salesforce.
  • The affected sites' own code and servers were not breached. They loaded a vendor script from a host they already trusted, and the script had been edited.
  • Check who can edit your third-party script settings, rotate credentials, and review your CSP (Content Security Policy) for 'unsafe-eval'.

A trusted address is not a trusted script

Many sites trust a vendor's script by its web address, and whatever that address serves then runs on every page. The Optimizely incident shows the weakness in that habit. Trust attaches to a host name. The risk sits with whoever can change what the host serves.

Scott Helme's security firm, Report URI, makes a similar point about its 16 November findings. A script you trusted yesterday may not deserve that trust today. A site can be compromised through a supplier while its own code and servers stay untouched.

What happened

Report URI found that visitors to 178 organisations were served malicious code on 16 November. The code arrived through Optimizely Web, a tool for testing changes to websites. The names include Zoom, the BBC and CNN. They also include HSBC, Equifax and Air France-KLM. BleepingComputer also reports Fox News among the affected sites.

The researchers fetched 1,611 distinct Optimizely snippets, mostly found through their own crawl data. They found 188 infected snippets. They say the real number is likely higher, because they could only check snippets they could find in time.

Optimizely gave its own account to BleepingComputer. It points to a flaw in how new Experimentation accounts are created. An outside party used that flaw to put harmful code into some customer projects. Optimizely says it closed the path, shipped a fix, removed the injected code and revoked tokens.

Report URI's checks show the clean-up moving fast. At 20:56 UTC it found the code in 169 of the 188 infected snippets. By 21:52 UTC it was in only 1. Report URI says the code was rebuilt 26 times during the day. Exposure was real, so check whether your own pages carried it on 16 November.

Report URI says it contacted Optimizely through several channels. It had no reply when it published. It also says it does not know how the attacker gained write access. Optimizely's statement offers a partial answer.

How the attack worked

Each customer's site loads one script file from Optimizely's delivery network. That file bundles Optimizely's code, the customer's tests and an optional custom-code box called Project JavaScript. Whatever sits in that box runs on every page.

The attacker put their code in that box. The rest of each file was untouched. The file still came from cdn.optimizely.com, with Optimizely's certificate. Report URI stresses this was not cache poisoning. The network served exactly what it was given. Optimizely's own sites carried the code too.

The injected loader pulled a second script, track.js, from 1688360.cc. Report URI saw three versions. One was a plain script tag. One hid the address in Base64 text, so a search for the domain would miss it. The third embedded the whole payload in the page and used it as a fallback, so blocking the domain did not stop it.

What the malware did

Report URI says every visitor got the same script, with every feature switched on. It replaced cryptocurrency wallet addresses with the attacker's own. It checked each address first, so only real ones were swapped. It also skimmed card numbers typed into a site's own form fields. It took screenshots, and cookies not marked HttpOnly. Cards entered in hosted payment frames from providers such as Stripe and Adyen were out of its reach.

On iPhones and iPads, the script tried to load two exploit kits, Coruna and DarkSword. Report URI read the kits' own code comments. They suggest devices on iOS 18.7.3 or newer, or 26.3 or newer, are safe from them.

As of 19:25 UTC that day, Report URI counted about $7,040 in the attacker's wallets. What it cannot see is how many cards or cookies were sent to the attacker's server.

Why some sites held up

Report URI tested the websites of 256 affected organisations. It checked each one's CSP, short for Content Security Policy. This is a list of rules telling the browser where a page may load code from and send data to. Report URI found 24 sites protected. What set them apart was a tight script-src rule that names only the hosts the site needs.

Another 17 sites were partly protected. Their connect-src rules, which limit where a page can send data, blocked theft of cards, cookies and screenshots. Those rules could not prevent the wallet swap, because the swap is done by code running inside the page itself.

Two common settings let the attack through. One was 'strict-dynamic', which trusts any script that a trusted script inserts. The other was 'unsafe-eval', which Report URI says Optimizely's own documentation tells customers to allow. At HSBC, the policy blocked track.js, but the inline copy still ran.

Report URI sells CSP monitoring. Read its claims about what its product would have caught as a vendor's view. Its crawl results are a separate matter. They show how site settings changed the outcome.

Questions for your team

Ask who can edit your Optimizely account, including users, API tokens and integrations. Ask whether those credentials have been rotated. Then assign someone to review the custom code in each project and experiment. Report URI advises looking for the domain 1688360.cc, the function atob( and any script nobody on your team wrote.

If your own forms accept card numbers, Report URI suggests assuming that cards typed on 16 November may be exposed. It says the same for session secrets held in cookies not marked HttpOnly. Decide whether you need to tell customers that you served them malware.

Then ask the harder question Report URI poses. For any third-party script, do you know what code it held last week? Report URI says that for almost every site, nobody can answer. Until someone can, approving a vendor's address means approving everyone who can edit what sits behind it.

Produced by the WebPulse Newsroom with AI assistance from the original reporting credited below, and checked against that source by our editorial review. How we use AI.
Original reporting: Report URI (Scott Helme).