The DevBlog.

The Optimizely Hack: How 178 Major Websites Ended Up Serving Malware

Attackers abused Optimizely to inject malicious JavaScript into 178 organisations’ sites, risking card theft and iPhone exploits. What to do.

Published

Updated

The Optimizely Hack: How 178 Major Websites Ended Up Serving Malware

Sometimes a website is compromised without anyone touching its code. That is what happened this month, when attackers exploited a vulnerability in Optimizely, a platform many companies use to run A/B tests and personalise their pages, and used it to push malicious code to the visitors of well-known sites.

What happened

Optimizely confirmed on 17 November that attackers had exploited a vulnerability in its web experimentation platform to inject malicious code into customer projects tied to 178 organisations. The activity was first detected on 16 November. Affected organisations named in reporting include CNN, the BBC, Zoom, HSBC, Salesforce and IKEA. Optimizely says it has fixed the vulnerability and removed the injected code.

The attackers appear to have abused a mechanism that lets Optimizely customers run their own code across their pages, a field known as Project JavaScript. Because that script is loaded from a trusted vendor, browsers and security tools had little reason to distrust it. Security analysts note that the websites’ own teams did not need to deploy anything for the malicious code to appear, which is what makes supply chain attacks so effective.

What the malicious code did

Security researchers described several capabilities:

  • Payment card skimming. Code could capture card details typed into a site’s own payment fields. It could not reach card data entered into hosted payment frames operated by providers such as Stripe and Adyen.
  • Cryptocurrency address swapping. If a visitor copied a wallet address from a page, the malware could replace it with the attacker’s address before the visitor pasted it.
  • iPhone and iPad exploitation. Reports mention an exploit kit called DarkSword that targets Apple devices through the browser.

Researchers also reported fake copies of certain websites built as part of the broader activity. We have not independently verified every technical claim, and you should read the primary write-ups listed below.

This was not Optimizely’s first incident.

SecurityWeek noted that Optimizely disclosed a separate incident in February, when a threat actor reached its systems through voice phishing. That does not mean the two incidents are connected, but it reinforces a common point: attackers target the vendors that hold the keys to many sites at once.

Why supply chain attacks work

A modern web page loads scripts from many third parties: analytics, ads, chat widgets, testing tools, tag managers. Each script runs with the full power of your page. If one of those vendors is compromised, the attacker inherits that power on every site that uses it. Your own security can be excellent, and you can still be affected.

What site owners should do now

If you use Optimizely Web Experimentation, security vendors recommend three immediate steps:

  1. Review your Project JavaScript for anything you did not write or approve.
  2. Rotate credentials and API tokens associated with your account.
  3. Check your logs for the indicators published by researchers and for unusual changes around 16–17 November.

More generally:

  • Inventory every third-party script on your key pages, especially checkout and login.
  • Keep payment entry inside hosted payment frames from your payment provider.
  • Monitor changes to third-party scripts and alert on unexpected behaviour.
  • Limit who in your organisation can edit code that runs on production pages.

We cover a fuller checklist in our guide to spotting third-party script risks (see article 8 in this pack).

What visitors can do

Keep your phone and browser updated, because exploit kits depend on unpatched software. Be cautious about copying and pasting crypto addresses: always compare the first and last characters after pasting. If you entered card details on an affected site during the window, watch your statements and contact your bank if you see anything unfamiliar.

The takeaway

The most important lesson is that trusting a vendor is a security decision. Every script you load is code you did not write but are responsible for.

Was this article helpful?

Comments

Comments are reviewed before they appear. Links are displayed as plain text and are not clickable.

Written by Methembe Nyoni

I'm Methembe, a developer and IT student who builds full-stack web and mobile apps with React, Node.js, Python, and Android. I like making tech that solves real problems in Zimbabwe and across Africa. I run The DevBlog, my own tech news site.