ABSplits

The Optimizely hack: how an A/B testing script served malware to 178 websites

Updated

The Optimizely hack: 178 sites, one trusted A/B testing script

TL;DR

  • On 16 November 2026, an attacker used a flaw in Optimizely's Experimentation product to add malicious JavaScript to customers' A/B testing projects.
  • Optimizely's CDN then served that code to visitors of at least 178 organisations, including the BBC, CNN, Zoom, Salesforce and HSBC. It skimmed cards, swapped crypto wallet addresses and targeted iPhones.
  • It worked because A/B testing scripts load first, on every page, and are allowed to run any code their account says to.
  • AB Splits is built so that a test can't run code at all: variants are data (text, links, images, styles), and the snippet blocks scripts whatever the settings say. Start free, or read how it's built below.

What happened

Optimizely Web Experimentation works like most A/B testing tools. Each customer adds a script from Optimizely's CDN to their site, and that script contains the customer's experiments plus an optional field called Project JavaScript, which runs on every page where the snippet loads. [TechRadar]

On 16 November 2026, malicious code appeared in that field across many customer projects. Optimizely said an unauthorised party exploited a vulnerability, which it described to BleepingComputer as being in the Experimentation account signup flow, and used it to add JavaScript to some customer projects. [BleepingComputer] Krebs on Security's copy of the statement doesn't mention the signup flow, so the exact route in may become clearer once investigations finish. [Krebs on Security]

Security researcher Scott Helme of Report URI spotted it. His team analysed 1,611 Optimizely scripts and found malicious code in 188 of them, belonging to 178 organisations. [BleepingComputer] Names in the reports include the BBC, CNN, Fox News, Zoom, Salesforce, GitLab, KLM, Air France, HSBC, Equifax, IKEA, ASOS, Vodafone and Optimizely's own site. [BleepingComputer] [TechRadar]

Because the files still came from Optimizely's CDN with Optimizely's certificate, browsers and security tools treated them as the normal, trusted script. [TechRadar] No one on the affected sites had to deploy anything for the malware to reach their visitors.

What the malicious code did

  • Card skimming. It watched checkout forms for card number, expiry date and security code, and sent them to an attacker's server. [BleepingComputer] Cards entered in hosted payment fields, such as Stripe's or Adyen's, were reportedly out of reach. [TechRadar]
  • Crypto theft. It replaced cryptocurrency wallet addresses with the attacker's, so payments went to the wrong wallet. [BleepingComputer] Estimates of what was stolen range from just over $7,000 to around $7,500. [TechRadar] [Krebs on Security]
  • iPhone and iPad attacks. It loaded exploit kits known as Coruna and DarkSword, aimed at older versions of iOS. [Krebs on Security]
  • Surveillance. It also collected cookies, page addresses and screenshots. [BleepingComputer]

According to Helme, the attacker rebuilt the payload 26 times in a single day. [TechRadar] That's the irony Krebs picked up on: the attackers were effectively A/B testing their malware, using an A/B testing platform.

Why A/B testing scripts are such a valuable target

The attack wasn't a fluke of one vendor. It hit a weak spot that testing tools share:

  1. They load first, on every page. Testing snippets sit near the top of the page so they can change it before visitors see it, and they often fire without waiting for consent. [Krebs on Security]
  2. They're designed to run arbitrary code. Custom JavaScript fields exist so marketers can do anything to a page. Anyone who gets into the account inherits that power.
  3. They're trusted by default. They come from a vendor's domain with a valid certificate, so they pass the checks site owners rely on. As Helme put it, “trusted JavaScript doesn't always remain trustworthy.” [Krebs on Security]
  4. Few sites restrict where scripts can send data. Of the affected sites in Report URI's analysis, 68 had no Content Security Policy at all and 50 had one loose enough to let the payload run. Only 24 had a policy that blocked it. [Krebs on Security]

Optimizely's response

Optimizely says it blocked access to the vulnerable path, deployed a fix and removed the injected code from affected projects. It ended active sessions, revoked tokens, reset access for affected accounts, added protections in Cloudflare to stop the code being delivered, and notified affected customers. [BleepingComputer] It also published an initial incident report on 17 November and is working with outside experts on a full investigation. [Krebs on Security]

Salesforce disabled Optimizely scripts across its preview and production sites as a precaution. [BleepingComputer]

What to check now, whatever tool you use

  1. Read every custom-code field. Project JavaScript, experiment JavaScript, custom HTML tags in your tag manager. Remove anything you can't explain, and look closely at anything changed on 16 November.
  2. Lock down accounts. Turn on two-factor sign-in or SSO, remove people who no longer need access, and rotate API tokens.
  3. Set a Content Security Policy. Limit which domains can run scripts (script-src) and, just as important, which domains the page can send data to (connect-src). That second rule is what stops a skimmer from sending card numbers out. Start in report-only mode so you can see what would break.
  4. Keep card entry in hosted payment fields. Payment iframes from your payment provider keep card numbers away from scripts on your page.
  5. Tell customers if you were affected. If your site served the code, warn users who paid with crypto or typed card details on 16 November.

How AB Splits is built differently

We build AB Splits, so read this section with that in mind. No software is immune to attack, and we won't claim otherwise. What we can control is how much damage a compromised account could do. We designed it so the answer is “not much”.

  • Tests are data, not code. An AB Splits variant is a list of changes: new text, HTML, a link, an image, a style, or a redirect to another page. There is no custom JavaScript field anywhere in the product.
  • The snippet enforces it. Even if a test's settings were tampered with, the snippet strips <script> tags, iframes and inline event handlers like onerror, refuses javascript: links and redirects, and drops CSS that loads anything from another site. We tested these cases with a deliberately malicious test before publishing this.
  • One file for everyone. Every site loads the same s.js, built from our own source code, rather than a file generated per customer. Your tests arrive as data the snippet reads, so there's no per-customer script for anyone to edit.
  • One domain to trust. The snippet loads from absplits.com and only ever talks to absplits.com. A strict Content Security Policy for it is short:
Content-Security-Policy:
  script-src 'self' https://absplits.com;
  connect-src 'self' https://absplits.com;
  style-src 'self' 'unsafe-inline';

The style-src line is there because the snippet adds small style blocks to apply CSS changes and hide the page briefly while variants load. Add the domains your site already uses, such as Google Analytics, to each line.

What we can't promise: if someone took over an AB Splits account, they could still change the words, images and links on that site. A swapped link to a fake login page is a real risk, which is why account access matters. But they couldn't run code in your visitors' browsers, read what people type, skim cards or load malware. That's the line the Optimizely attack crossed.

Other basics: AB Splits sets no cookies, can wait for your cookie banner before it runs, and never runs for search bots, page builders or logged-in WordPress users. You sign in with a one-time email link, so there's no AB Splits password to reuse or leak. More in the docs, or see the full comparison with Optimizely.

Questions

Was Optimizely hacked?+

Optimizely says an unauthorised party exploited a vulnerability in its Experimentation product, which BleepingComputer and TechRadar report as the account signup flow, and used it to add malicious JavaScript to some customer projects. The code was then served to visitors of those customers' websites from Optimizely's CDN.

Which websites were affected?+

Researcher Scott Helme found malicious code in 188 Optimizely scripts belonging to 178 organisations, out of 1,611 scripts analysed. Brands named in press reports include the BBC, CNN, Fox News, Zoom, Salesforce, GitLab, HSBC, Equifax and IKEA. The true number may be higher, because only scripts the researchers could find were checked.

I visited one of these sites. Am I at risk?+

Reports say the code swapped cryptocurrency wallet addresses, tried to skim card details typed into checkout forms, and targeted older iPhones and iPads. If you sent crypto or typed card details on an affected site on 16 November, check the transaction and your statements. Keep iOS up to date. Cards entered in hosted payment fields, such as Stripe's, were reportedly out of the skimmer's reach.

Is Optimizely safe to use now?+

Optimizely says it blocked the vulnerable path, deployed a fix, removed the injected code and reset affected accounts. Whether to keep using it is your call. Whatever tool you use, review its custom-code fields, tighten account access and set a Content Security Policy.

Could the same thing happen with AB Splits?+

No vendor is immune to being attacked. The difference is what an attacker could do with access. An AB Splits test can only change text, HTML without scripts, links, images and styles. The snippet refuses to run scripts, inline event handlers, javascript: links or CSS that loads from other sites, whatever a test's settings say. A hijacked account could still deface a page, which is serious, but it couldn't skim cards or load malware.

Sources

  1. BleepingComputer: Optimizely supply chain attack delivers malware to CNN, Fox News, BBC, Salesforce sites
  2. TechRadar: Some of the world's largest brands hit following Optimizely flaw
  3. Krebs on Security: Attackers Used Optimizely to A/B Test Malware on Top Websites

Details come from these reports as of 22 November 2026 and may change as investigations continue. Optimizely is a trademark of its owner.

The safe alternative

A/B testing that can't run code on your site

Every AB Splits test is data, not JavaScript. One 8 KB snippet, the same file for every customer, that only talks to absplits.com. AI writes your variants and results land in GA4.

  • No custom JavaScriptTests change text, links, images and styles. Nothing else runs.
  • Blocked in the snippetScripts, event handlers and javascript: links are stripped even if a test contains them.
  • One domain to allowA tight Content Security Policy needs just absplits.com.
  • Free to start1,000 visitors a month free. Paid plans from $19, prices published.