News Cyber Attacks
Optimizely Flaw Abused to Inject Malicious JavaScript Into Customer Sites
Optimizely has confirmed that an unauthorised party exploited a vulnerability in its Web Experimentation product to add malicious JavaScript to customer projects. Report URI, which tracked the incident, counted infected snippets across 178 organisations.

Key takeaways
- Optimizely confirmed an unauthorised party exploited a vulnerability to add malicious JavaScript to some customer projects, and says the flaw is fixed.
- Report URI says the attacker wrote into the Project JavaScript field and the trusted Optimizely CDN served the result, so this was not cache poisoning.
- Report URI counted 188 infected snippets out of 1,611 examined, across 178 organisations; Optimizely has not given figures.
- The payload swapped crypto addresses, skimmed cards, stole cookies and screenshots, and loaded iOS exploit kits, though successful iOS exploitation has not been demonstrated.
- Third-party scripts with free-text code fields are supply chain, and Report URI notes that allowlisting the trusted CDN host in a Content Security Policy did not stop this payload.
Optimizely has confirmed on its status page that an unauthorised party exploited a vulnerability in its Web Experimentation product and used it to add malicious JavaScript to some customer projects. The company says it has fixed the vulnerability and removed the injected code from affected projects. It has not described the vulnerability or said how many customers were affected.
The mechanism is the lesson #
Report URI's Scott Helme, who tracked the incident as it unfolded, says the attacker wrote code into the Project JavaScript field of customer projects. This was not CDN cache poisoning, in Report URI's words. The snippets were still served from cdn.optimizely.com, exactly as designed, with attacker code inside them.
That matters because the usual browser-side defences assume the trusted origin is trustworthy. Report URI notes that allowlisting the CDN host in a Content Security Policy did not help, because the malicious code came from that trusted host.
Scale, by Report URI's count #
Report URI examined 1,611 distinct Optimizely snippets and found 188 infected, belonging to 178 organisations. The brands it names include Zoom, BBC, CNN, Salesforce, GitLab, IKEA, HSBC, Equifax, Air France-KLM, Ledger and Peacock. These are researcher figures, and Optimizely has given no numbers of its own.
Report URI's timeline shows the first Optimizely injection early in the day, a card skimmer added about nine hours later, and mass clean-up starting in the evening, with one snippet still infected roughly an hour after that. It also reports an earlier wave in the preceding days that injected the same loader through Kissmetrics, StorifyMe and Minute Media scripts.
What the payload did #
According to Report URI, the injected code:
- Replaced cryptocurrency addresses in page text, forms, the clipboard and outgoing requests
- Skimmed card numbers, expiry dates and CVVs
- Exfiltrated cookies and screenshots
- Loaded the Coruna and DarkSword iOS exploit kits for iPhones on older iOS releases
On the last point, SecurityWeek reports that Hudson Rock said successful iOS device exploitation has not been demonstrated.
What appsec teams should take from it #
- Inventory every third-party script that exposes a free-text JavaScript field: experimentation tools, tag managers, analytics and personalisation platforms.
- Treat those vendor consoles as privileged infrastructure. Enforce SSO and MFA, limit who can edit project-level code, and review change history.
- Monitor the content of third-party scripts for unexpected change, since origin trust alone did not help here.
- Deploy CSP with reporting, and restrict
connect-srcandform-actionso injected code has fewer places to send data. - If your site loaded an Optimizely snippet during the incident window, review sessions, payment flows and any wallet addresses displayed to users.
Sources
Questions this raises
- Was the Optimizely CDN itself compromised?
- Report URI says no. The attacker wrote code into the Project JavaScript field of customer projects, and the CDN served those snippets as it normally would. Report URI states this was not a CDN cache-poisoning attack.
- What vulnerability was exploited?
- Optimizely has not described it. Its status page says only that an unauthorised party exploited a vulnerability, that the vulnerability has been fixed, and that injected code was removed from affected projects.
- Were iPhones actually compromised?
- Report URI says the payload served the Coruna and DarkSword iOS exploit kits to older iPhones. SecurityWeek reports that Hudson Rock said successful iOS device exploitation has not been demonstrated.