Pricing Academy Blog

Magecart via your A/B testing tool

Your A/B testing tool is a script on your checkout page. On 16 November a card skimmer reached 178 organisations through their Optimizely testing snippets. What happened, why a testing tool is such a good hiding place, and what to check on your own checkout and upsell pages this week.

Summarize with:
Magecart illustration: the ElasticFunnels mascot points at the card fields of a checkout page while a code block from a cloud plugs into its corner
The short answer

Magecart is web skimming: JavaScript on a checkout page that copies card details as buyers type them. This week it arrived through an A/B testing tool. An attacker used a flaw in Optimizely's signup flow to add code to customers' testing projects, and Optimizely's own CDN served it to every page that loaded the snippet.

Any script that loads on your checkout can read your checkout. I'd start by listing those scripts and the people who can change them.

Ask a media buyer what loads on their checkout page and you'll usually hear "the pixel". Open the browser's network tab on the same page, a hypothetical but a very ordinary one, and the list runs longer: the Meta pixel, Google's tag, a tag manager, a heatmap, a chat widget, a review badge and an A/B testing snippet someone installed for a headline test eight months ago.

Every one of those files runs with the same rights as your own code. On the day of the Optimizely attack, the one that mattered was the testing snippet.

What happened in the Optimizely Magecart attack

On Monday, 16 November 2026, someone got write access to other companies' Optimizely Web Experimentation projects. Optimizely's status page says an unauthorized third party "exploited a flaw in the Optimizely Web Experimentation account signup flow" and "used it to impersonate users on targeted customer accounts". The attacker put JavaScript into those projects, and every site carrying the project's snippet served it to visitors.

Magecart attack path diagram showing code added to an A/B testing project, served from the vendor's CDN and run on checkout pages to send card data out
Magecart attack path: the skimmer rode inside a trusted A/B testing script, so every page that loaded the snippet ran it, checkout included.

The clearest public account comes from Report URI, Scott Helme's company, which fetched 1,611 Optimizely snippets that day. The main numbers:

WhatFigureSource
Infected snippets188 of 1,611 checkedReport URI
Organisations behind them178Report URI
Optimizely customers affected"Less than 5%"Optimizely
Payload rebuilds26 during the dayReport URI
Crypto received by attacker walletsAbout $7,000 by that eveningReport URI

Report URI's list includes Zoom, the BBC, CNN, Salesforce and GitLab. Being on it means that company's snippet carried the code during the window. It says nothing about whether any of their customers lost money, and none of these companies has said so.

The crypto figure needs a caveat too. StepSecurity, which traced the same wallets, notes that "the chain does not show which transfers came from victims". Nobody outside the attacker knows how many cards were skimmed.

The payload grew through the day. It started as a wallet-address swapper, gained a card skimmer at 13:43 UTC, and later an exploit loader aimed at older iPhones. The clean-up ran through that evening, and by 21:52 UTC all but one snippet was clean. Optimizely says it closed the flaw within three hours of detection and removed the code from all affected projects.

Magecart attack timeline chart showing the first injection at 04:21 UTC, the card skimmer at 13:43 and all but one snippet cleaned by 21:52 on 16 November
Magecart attack timeline (UTC, 16 November 2026): the payload grew through the day, and the card skimmer ran from 13:43 until the evening clean-up.

What is Magecart?

Magecart is the umbrella name for web skimming, also called formjacking: malicious JavaScript on a payment page that reads what the buyer types and sends a copy somewhere else. The order still goes through. The buyer gets a receipt, the merchant gets paid, and the stolen card details get used later.

The skimmer in this attack read the card number, expiry date and CVV from the site's own form fields and from requests the page sent. Report URI notes one limit: cards typed into hosted payment iframes, such as Stripe's or Adyen's, were out of its reach.

Why a testing script is a good hiding place

A client-side A/B testing tool works by changing the page in the visitor's browser after it loads. To do that job it needs three things a skimmer also wants:

  • It loads everywhere. The snippet usually sits in the site-wide header, so it lands on checkout and upsell pages even when no test runs there.
  • It is allowed to change the page. Rewriting headlines, buttons and forms is the product. Code that touches a form looks normal.
  • It comes from a trusted host. The file came from Optimizely's CDN over valid HTTPS. Report URI wrote that allowing that domain in a Content Security Policy "was never going to help". Sites that served the snippet from their own domain were hit too, since the content still came from the same project.

Put together, the security of your checkout includes the login page of every vendor whose script runs on it.

What to check on your checkout and upsell pages

An afternoon covers most of this. Work through the checkout page and every upsell page that takes payment details or charges a stored card.

CheckHow
Which third-party scripts loadOpen the page, then the browser's Network tab filtered to JS. Write down every domain that isn't yours or your payment processor's.
Which of them need to be thereA purchase pixel does. A heatmap, chat widget or testing snippet with no live test on that page usually doesn't. Remove it from payment pages.
Who can change themList the seats in your testing tool, tag manager and site builder. Remove past staff and agencies, and turn on two-factor login everywhere it exists.
Tag manager publish rightsAnyone who can publish a container can put code on checkout. Keep publish rights to one or two people.
Content Security PolicyA restrictive script-src limits what can load, and a tight connect-src limits where data can go. Start in report-only mode so you see what breaks.
Subresource IntegrityAdd an integrity hash to scripts whose files never change, such as a pinned library version. It doesn't fit a testing snippet that changes on every publish.
Where the card is typedAsk your platform or processor whether card numbers go into hosted fields (an iframe from the processor) or plain form fields on your page.

On the CSP point, Report URI's own sample is a fair picture of where most sites stand. Of the affected organisations it evaluated, 68 had no policy at all and 50 had one that let both the payload and the stolen data through. 24 blocked the payload outright, all of them with a restrictive script-src.

Does your A/B testing tool need to run in the browser?

There are two ways to run a split test. In client-side testing, a vendor script loads in the visitor's browser and rewrites the page into the variant. In server side testing, the variant is chosen before the page leaves the server, and the browser receives one finished page.

Server side testing vs client-side testing comparison diagram showing which scripts load on a checkout page and who can change them in each setup
Server side testing vs client-side: picking the variant before the page is sent takes one outside script off the checkout, while your own tags still need the same care.

Client-side tools earn their place. A visual editor lets a marketer test a headline on any site without a developer, and for a content page that trade is often fine.

On a payment page I'd weigh it differently. If the testing tool can't pick the variant before the page is sent, I'd keep its snippet off checkout and upsells and run those tests somewhere that can. Server-side testing has costs of its own: your platform has to render each variant, and you lose the point-and-click editor that works on any site.

How split tests run in ElasticFunnels

When we built split testing into ElasticFunnels, the goal was to keep the ad's URL fixed: up to 5 variants under one URL, so a campaign never has to relearn a new link. To serve a different page at the same address, ElasticFunnels picks the variant on its own server before the page is sent. That holds for page tests and for tests on single elements like a headline or a price block.

  • No testing vendor's script on the page. The browser gets the chosen variant as one page. There is no outside snippet rewriting it after it loads.
  • Changing a test takes a login to your ElasticFunnels brand with split test access. Keep that list short too.
  • Your own tags still load. Pages → Tracking Scripts lets you add pixels and custom code to chosen pages, checkout included, and ElasticFunnels' own page script runs too. Those deserve the checklist above like any other.

What that buys you is fewer outside scripts on the checkout, and one less vendor login standing between an attacker and your card form. If that's the part you want, the split testing overview shows how a same-URL test is set up and how the winner is judged on sales.

My take
  • If nobody on the team can name every script on the checkout from memory, the list is too long.
  • A testing snippet with no live test on the checkout is pure risk there. Take it off today. It costs nothing to put back.
  • Shared logins to the tag manager or testing tool are how an agency that left two years ago still has publish rights. Give everyone their own seat.
  • Treat a new script on the payment page like a change to the payment code, because that's what it is.

Keep testing your checkout. Before the next script goes on the page where the money changes hands, ask who else can edit it and what it could read once it is there.

Sources

FAQ

Magecart and checkout scripts FAQ

What is a Magecart attack?

Magecart is the name used for web skimming: malicious JavaScript on a checkout page that copies card details as the buyer types them and sends them to the attacker. The store's own payment processing keeps working, so neither the buyer nor the merchant sees anything wrong at the time.

How do I know if my site loaded the Optimizely skimmer?

If you use Optimizely Web Experimentation, read your Project JavaScript and every experiment's custom code for code you did not write, and check whether Optimizely notified you. Report URI and StepSecurity published the attacker's domains. Search your logs and CSP reports for them from 16 November 2026.

Would a Content Security Policy have stopped it?

Only a strict one. Allowing the testing vendor's domain did nothing, because the skimmer came from that domain. In Report URI's sample, policies with a restrictive script-src blocked the payload, and a tight connect-src stopped the data from leaving even where the script ran.

Does Subresource Integrity protect a testing snippet?

Rarely. SRI pins a script to a fixed hash, and an A/B testing snippet changes every time someone publishes an experiment, so a hash breaks the tool. Use SRI for libraries with versioned, unchanging files, and rely on access control and CSP for the testing script.

Are hosted payment fields safe from web skimming?

They were out of reach in this attack. Report URI says cards typed into hosted payment iframes, such as Stripe's or Adyen's, could not be read by the skimmer, while cards typed into the site's own form fields could. Hosted fields still leave the rest of the page, like addresses and cookies, exposed to a bad script.

Should I stop A/B testing my checkout?

No. Change where the test runs instead: take browser-side testing snippets off payment pages, or use a platform that picks the variant on its server, and keep the list of people who can change checkout code short.

Split test your checkout without a testing snippet on it

Every feature on every plan. Start a 14-day free trial.