Clean site code, yet 178 organizations hit: how did the Optimizely attack work?
On November 16, malicious code ran on the sites of 178 organizations through a file served from Optimizely's own CDN. It was cleaned the same day, and on 24 sites with a strict CSP rule it never ran. What a supply chain attack is and what site owners and visitors can do.
A website's own servers can be solid and its own code clean, yet much of the code running in a visitor's browser often comes from other companies' servers. The Optimizely incident of November 16 showed very clearly how that chain works. According to research published by Report URI, malicious JavaScript ran that day on the sites of 178 organizations, delivered through a script served from Optimizely's own CDN. The incident was spotted the same day and cleaned up before midnight.
Optimizely is a platform companies use for A/B testing and personalization. Sites load a small JavaScript file, the "snippet", from Optimizely's servers; it carries the customer's experiments plus an optional field called "Project JavaScript" that runs on every page. The attacker wrote their own code into that field. The rest of the file was untouched and still came from cdn.optimizely.com with Optimizely's certificate, so browsers ran it like the trusted file it always was.
How did it come to light?
Report URI is a security service that watches which scripts sites load in the browser. Founder Scott Helme writes that its systems flagged the first suspicious activity on a customer site at 15:06 UTC on November 16. The team then fetched 1,611 distinct Optimizely snippets it could find and found the same malicious code in 188 of them, belonging to 178 organizations. Report URI's list covers banks, news sites, airlines and software companies, including the BBC, CNN and Zoom. Optimizely's own sites are on it too. The team says the real number may be higher, since it could only check the snippets it found in time.
Optimizely announced the incident on its status page at 01:02 UTC on November 17. The company says an unauthorized party exploited a vulnerability in Experimentation to add malicious JavaScript to some customer projects; the vulnerability is fixed, the injected code was removed, affected user accounts were secured and extra protections now block unauthorized code delivery. The Record reports that the company's technical advisory confirmed Report URI's findings and that customers were contacted directly; Socket's summary says the flaw was in the Experimentation account signup flow. Security firm Hudson Rock separately confirmed the findings. Salesforce told Reuters it was investigating unauthorized Optimizely changes and had disabled scripts as a precaution.
What did the code do?
Report URI's timeline shows the payload was rebuilt 26 times during the day, growing piece by piece. The first version swapped cryptocurrency wallet addresses on the page and in the clipboard for the attacker's. At 13:43 UTC a card skimmer was added that tried to capture the card number, expiry date and security code typed into a site's own form. Cards entered inside a payment provider's own frame (iframe), such as Stripe or Adyen, were out of its reach. The code also collected some cookies and page screenshots, and on iPhones and iPads it tried to load the Coruna and DarkSword exploit kits aimed at older iOS versions. Socket separately decoded an early sample and saw the wallet-swapping module and the iOS loader in its own analysis.
Losses along the chain stayed limited. From blockchain records, Report URI tracked about $7,150 in crypto arriving in the attacker's wallets. It also states plainly that there is no way to see from outside how many cards or devices were affected. All infected files were clean as of 23:11 UTC on November 16, and the attacker's main domain was suspended overnight on November 17.
What exactly is a supply chain attack?
Think of a kitchen: the cook works cleanly, but some ingredients come from an outside supplier. If someone gets into the supplier's warehouse, spoiled ingredients reach the kitchen without the cook doing anything wrong. The web works the same way. Adding a <script src="..."> line to a site means "fetch whatever is at this address right now and run it". Files for analytics, ads, chat widgets and A/B testing are updated often, so their content can change daily. Helme puts the question simply: do you know what code is running on your website?
What can site owners do?
Report URI scanned 256 hosts of the affected organizations and measured how their own security settings held up against this attack. The result is instructive: on the sites of 24 organizations (about 15 percent) the malicious code could not run at all. What they shared was a strict script-src rule in the browser setting called Content Security Policy (CSP), listing exactly which hosts may load scripts. At 17 more organizations, a connect-src rule stopped data from being sent out. 68 organizations had no CSP at all.
- Script inventory: List which external scripts your site loads and remove what you do not need. Check whether experimentation and personalization scripts really need to run on payment and account pages.
- CSP: Start in report-only mode (
Content-Security-Policy-Report-Only); it breaks nothing and simply alerts you when a new script or data destination appears. Report URI's first alert came from exactly such a report. Then tightenscript-srcandconnect-src, and avoid'unsafe-eval'where you can. - SRI: For files whose content is fixed, the
integrityattribute lets the browser check that it got the file it expected. It is hard to use on files that change constantly and easy on pinned libraries. - If you use Optimizely: Report URI recommends reviewing every project's Project JavaScript and each experiment's custom code, and reviewing and rotating users and tokens with write access.
What can visitors do?
If you visited one of these sites on November 16, updating your iPhone or iPad to the current iOS version and glancing at your card statement if you paid by card that day is a sufficient precaution. According to Report URI, the flaws targeted by the kit are fixed in iOS 18.7.3 and iOS 26.3 and later. If you sent crypto that day, it is worth checking that the address you pasted matches the one you meant to use.
The main lesson sits on the positive side: free tools that browsers have offered for years stopped this attack completely on 15 percent of the sites, when they were set up properly. In Helme's words as quoted by Help Net Security, trusted JavaScript does not always remain trustworthy, and a website can be compromised through a third-party dependency without its own code ever being breached.
Sources: Report URI research, Optimizely status page, The Record, Help Net Security, Socket, Scott Helme