Blog / Front Line — part 22 of 25

Optimizely supply chain attack: what OPTIMJACK means for your website

· urgentic · 5 min read

Short read

This post covers the Optimizely supply chain attack, in which malicious code was added to the scripts that at least 178 organisations, including the BBC, CNN, Zoom and several UK telecoms brands, load from the testing service. For roughly 16 hours on Monday, visitors to those sites were served a card skimmer, a cryptocurrency address swapper and iPhone exploit kits.

You'll learn what happened, why a trusted third-party script is such an effective way in, and the checks researchers recommend whether you run Optimizely or any other tag on your own website.

On Monday 16 November, an attacker turned one of the most trusted scripts on the web into a way to steal from the people visiting it. The Optimizely supply chain attack, which some researchers have named OPTIMJACK, saw malicious JavaScript planted in the scripts that Optimizely's customers load to run website experiments. Because those scripts came from Optimizely's own servers with its own certificate, every page that loaded one ran the attacker's code too.

The sites affected weren't small. They included the BBC, CNN, Zoom, Salesforce, GitLab, HSBC, IKEA and Air France-KLM, and in the UK O2, Virgin Media, TalkTalk and NOW TV.

What happened

According to The Hacker News, Optimizely said in an incident notice early on 17 November that an attacker had "exploited a vulnerability in Experimentation" and used it to add malicious JavaScript to some customer projects. The company says it has fixed the flaw, removed the code and secured affected accounts. Its notice doesn't say how the flaw worked, how many projects were changed or what customers should do.

Security researcher Scott Helme of Report URI raised the alarm. As BleepingComputer reports, his team checked 1,611 Optimizely scripts and found the malicious code in 188 of them, belonging to 178 organisations. He thinks the real number is likely higher. Banking and finance was the largest group, with 32 organisations, according to StepSecurity's analysis.

The timeline is short but telling:

  • 04:21 UTC: the first injection appears, in a BBC script.
  • 05:23 UTC: the attacker registers the domain that hosts the main payload.
  • 13:43 UTC: a card skimmer is added to the payload.
  • About 20:40 UTC: a mass clean-up begins. By 21:52 UTC only TalkTalk's script still carries the code.

For most sites, StepSecurity puts the exposure window at about 16 hours. Report URI also saw Smartsheet's script cleaned and then re-infected with a hidden version of the code, which suggests the attacker still had access at that point.

What the malicious code did

The attacker didn't replace Optimizely's script. They wrote a small loader into each project's "Project JavaScript" field, a custom-code field that runs on every page, and left everything else alone. Some versions hid the payload address in base64 so a simple text search would miss it, and one carried a full copy of the payload in case the domain was blocked.

Once loaded, the payload:

  • Swapped cryptocurrency wallet addresses on the page and in the clipboard for the attacker's own, so a copied address could already be wrong by the time it was pasted.
  • Skimmed payment cards entered into a site's own forms. It couldn't read card fields shown inside a payment provider's separate frame, such as Stripe's or Adyen's hosted fields.
  • Sent cookies and a screenshot of the page to the attacker after it swapped an address. It couldn't read cookies marked HttpOnly.
  • Targeted iPhones and iPads with the Coruna and DarkSword exploit kits, aimed at older iOS versions.

Cynet, which retrieved the iPhone stage using an emulated browser, describes what it saw as conditional delivery, "not a successful compromise of a physical iPhone or iPad". Researchers say the attacker's wallets received about $7,000, though StepSecurity notes that the chain doesn't show which transfers came from victims.

Why this matters beyond Optimizely

It's tempting to file this under "big brands' problem", but the lesson applies to almost any business with a website. Most sites load code from analytics, testing, chat, advertising and marketing services. Each of those scripts runs with the same power as your own code, in your customer's browser, on your domain. If the supplier is compromised, so are you, without anyone touching your servers.

Two details make that point clearly. First, the code came from a legitimate, expected host, so allowing cdn.optimizely.com in a security policy didn't help. Second, Cynet notes that a site serving the code hadn't necessarily had its own systems breached. Your customers, though, won't see the difference.

It's also worth noticing how this was caught. Report URI spotted it by watching the scripts websites run, and Cynet's endpoint detection flagged browsers connecting to the attacker's server. Both are examples of monitoring what actually happens rather than trusting what should happen.

What to check now

If you use Optimizely Web Experimentation, researchers recommend you:

  • Open the Project JavaScript in every project and the custom code in every experiment, and look for 1688360, atob( or any script you didn't write.
  • Review which users, API tokens and integrations can write to your account, and rotate their credentials.
  • Ask Optimizely which of your project IDs were changed, when and how.
  • Treat card details entered in your own forms on Monday, and any session tokens in cookies without the HttpOnly flag, as possibly exposed.
  • Search your logs back to Monday morning for connections to 1688360[.]cc, webshell[.]lol and the two .icu domains in the published indicators.
  • Consider telling customers that your site served them the code.

Whether or not you use Optimizely, the wider steps are the same:

  • Keep an inventory of third-party scripts on your site, especially on login and checkout pages, and remove the ones you don't need.
  • Keep third-party tags off checkout pages, and take card details through your payment provider's own fields in a separate frame.
  • Use a strict Content Security Policy for scripts and outbound connections, and monitor violation reports.
  • Watch outbound traffic from your own devices for connections to newly registered or known-bad domains, because staff browse the same sites your customers do.
  • Keep iPhones and iPads updated. Report URI advises iOS 18.7.3 or later, or iOS 26.3 or later.

The bottom line

The OPTIMJACK campaign didn't need to break into 178 organisations. It needed one weakness in a service they all trusted. That's the reality of supply chain risk: your attack surface includes every supplier whose code runs in your name. Knowing what's running, and spotting quickly when it starts talking to somewhere it shouldn't, is what turns a 16-hour exposure into a short one.

  • Optimizely
  • OPTIMJACK
  • supply chain
  • web skimming
  • third-party scripts
  • JavaScript
  • card skimmer
  • iOS exploits
  • SOC