A Trusted Website Tool Turned Against Its Customers: Optimizely Flaw Pushed a Card Skimmer to 178 Organizations’ Sites in One Day
An attacker abused a weakness in Optimizely’s experimentation platform to slip malicious JavaScript into customers’ own site code, reaching visitors of the BBC, CNN, Zoom, Salesforce and many more. The script swapped crypto wallet addresses, skimmed cards typed into on-site forms and pointed iPhones at exploit kits. Here is the briefing and what it teaches any business that loads third-party scripts.
In the first hours of Monday, November 16 (UTC), the websites of some very large brands quietly began handing their visitors malware, and none of those companies had been hacked directly. The code arrived through Optimizely, a platform businesses use to run A/B tests and personalize their web pages by loading its JavaScript on every page. Optimizely has confirmed that an outsider exploited a vulnerability in its Experimentation product and inserted malicious code into some customer projects. The account below draws on Help Net Security’s write-up of the incident, with additional detail from BleepingComputer and SecurityWeek.
The briefing in brief
- Entry point: According to Optimizely’s statement to BleepingComputer, the weakness was in the Experimentation account signup flow. The attacker used it to place code in the optional “Project JavaScript” field, which customers normally use for their own scripts and which runs on every page.
- Reach: Scott Helme of Report URI, who uncovered the attack, says his team checked 1,611 Optimizely snippets and found 188 infected files belonging to 178 organizations, including Zoom, the BBC, CNN, Salesforce, GitLab, IKEA, HSBC, Equifax and Air France-KLM. Banks and financial firms were the largest group, at 32. Helme believes the true count is higher because his team only examined snippets it found in time.
- Why browsers trusted it: The tampered code was still delivered from Optimizely’s own content delivery network, so it looked like the normal, approved script.
- Window: Report URI’s earliest Optimizely injection is timestamped 04:21 UTC on November 16 (late Sunday night, Eastern time). By 21:52 UTC that day, only one infected script had not yet been cleaned, and Helme later confirmed all were clean by late Monday.
- Vendor response: Optimizely says it blocked the vulnerable path, deployed a fix, removed the injected code, ended active sessions, revoked tokens, reset access for affected users and notified affected customers. Salesforce said it disabled Optimizely scripts as a precaution while it investigates.
What the malicious script did
- Watched pages for cryptocurrency wallet addresses and replaced them with addresses controlled by the attacker.
- Captured card numbers, expiration dates and security codes typed into a site’s own payment forms. Card fields hosted by a separate payment provider were outside its reach, according to Helme.
- Collected cookies, page addresses and screenshots.
- Served the Coruna and DarkSword iOS exploit kits to iPhone and iPad visitors. Hudson Rock, which investigated separately, confirmed the link to exploit-kit infrastructure but said successful exploitation of a real device has not been shown.
Helme reports that the payload was rebuilt 26 times during the day and that the attacker’s wallets collected roughly $7,150 in cryptocurrency before being emptied early Tuesday. He has said there is no way to tell how many cards were skimmed. Some injected files also carried a full backup copy of the malicious code that could run if the attacker’s remote file was blocked.
Not only Optimizely
Hudson Rock and a researcher at Ohey traced tampered scripts from three other services, Kissmetrics, StorifyMe and minute-ly, to the same iOS-focused infrastructure, with the earliest tampered responses on November 13. The researchers caution that shared hosting and loader code do not prove a single operator or a single method of entry.
The lesson about content security policies
Report URI crawled the affected organizations to see whether a Content Security Policy (CSP), a browser rule that limits where a page may load scripts from and send data to, would have stopped the attack. Only 24 organizations, about 15%, had a policy strict enough. Another 68 had none, and in 50 cases the policy still let the malware run and send stolen data out. Simply allowing Optimizely’s domain offered no protection, because the malware came from that domain. Helme’s summary: trusted JavaScript does not always stay trustworthy, and a site can be compromised through a third party without its own code or servers ever being breached.
What this means for your company
Most small and midsize business websites load code from outside services: analytics, chat widgets, testing tools, review badges, booking forms. Each of those is a supplier with a direct line into your visitors’ browsers. If you take payments or collect personal data on your own pages, list every third-party script your site loads, remove the ones nobody uses, and keep card entry inside a hosted payment page or field run by your payment provider. Add a Content Security Policy that restricts where scripts can send data, not just where they load from, and turn on reporting so you hear about unexpected script behavior. If staff or customers visited affected sites on November 16, the practical steps are to watch card statements, double-check any crypto transfer addresses made that day and keep iPhones and iPads fully updated.
If you are not sure what outside code is running on your checkout or contact pages today, we can help you inventory it and lock it down. Reach out to Layer 7 Data Solutions to discuss how we’ve helped companies similar to yours.
