An attacker exploited a flaw in Optimizely Web Experimentation to plant malicious code in some of the scripts that customers' websites load from the service, Optimizely said early today. Visitors to sites run by at least 178 organizations, including CNN, the BBC and Zoom, received the code yesterday, according to Report URI, a firm that monitors the scripts websites run. The code has been reported as serving a card skimmer and iOS exploit kits.
What happened
In an incident notice posted at 01:02 UTC, Optimizely said the attacker had "exploited a vulnerability in Experimentation" and used it to add malicious JavaScript to some customer projects. The scripts in question are loaded directly by customer websites from the service, so the change reached end users without any code change on the affected sites.
Report URI checked 1,611 Optimizely snippets, mostly identified through its own crawl data, and found code in 188 of them, belonging to 178 organizations. The firm says crypto has already been stolen. As of 19:25 UTC yesterday, the attacker's wallets had received about $7,040, all within roughly nine hours.
How it was done
According to Optimizely, the entry point was a vulnerability in Experimentation, which the attacker used to add malicious JavaScript to some customer projects. The details of the flaw have not been published.
exploited a vulnerability in Experimentation
Because experimentation snippets run with full access to the page, injected code in a project is delivered to every visitor who loads it, on any page where the snippet is present.
What to check
If you load experimentation or personalisation scripts from a vendor, start with what is actually running in your users' browsers.
List every third party script on payment and login pages
Open a checkout or sign-in page with browser devtools, go to the Network tab and filter on JS, then record every external origin. Compare that list against the vendors you expect. Anything you cannot attribute to an owner and a contract is a finding.
Pull your current vendor snippet and diff it
Fetch the hosted file with curl and store a hash, then compare it to a copy taken from a known good date. Unexplained new functions, obfuscated blobs or fetch calls to unfamiliar domains are the signal to escalate.
Review who can publish changes in the vendor console
In the experimentation platform, list users, API tokens and integrations with publish rights. Look for accounts without multi factor authentication, shared logins and tokens that have not been rotated. Remove anything that is not tied to a named owner.
Check your Content Security Policy and reporting
Inspect the Content-Security-Policy header on production responses and confirm script-src is an allowlist, not a wildcard, and that report-uri or report-to is set. If reports are not reaching a destination someone reads daily, you have no browser side alerting.
Look for outbound calls to unknown domains from client sessions
Query your edge or CDN logs and any client telemetry for requests from page context to domains outside your allowlist. Spikes from one page template, or traffic to domains registered recently, are worth isolating.
Confirm you can disable a vendor snippet fast
Write down and test the exact steps and the owner for removing a third party tag from production, including out of hours. If the only path is a full release cycle, add a kill switch at the edge or in the tag layer and test it.