Bernt Roalkvam

Optimizely malware: who can change your website's code?

An attacker put malware on 178 websites, including Zoom and the BBC, without breaking into any of them. They came in through a marketing tool the sites already used. Here is how to find those tools on your own site.

On 16 November, Zoom, the BBC, CNN, GitLab, IKEA, HSBC and 172 other organisations served malware to their visitors. The malware swapped crypto wallet addresses, copied card numbers from forms and tried to break into iPhones (Report URI).

Here is the strange part. None of those websites was hacked. Nobody broke into their servers. Nobody changed their code. The malware came in through a marketing tool the sites already used.

Most marketing sites have tools like it. Maybe the sites you built for your clients too.

The short answer
Anyone with access to the dashboard behind a script on your site can change what your visitors run, without touching your site. On 16 November, an attacker wrote malware into Optimizely's dashboard, and 178 organisations served it. To find your own risk, list every outside script on your site, the dashboard behind each one, and every login and key that can change it. Then remove what nobody needs.
See how Splitleaf keeps a history of every change

One marketing tool, 178 websites

Optimizely Web is a tool for A/B tests. A marketer makes two versions of a page, and Optimizely shows each version to a part of the visitors. To make that work, the website loads a small piece of code from Optimizely on every page.

In the Optimizely dashboard, customers can also add their own code. That code runs on every page of their site, for every visitor.

The attacker got into that setting in the accounts of 178 organisations and added their own code. The sites did not change anything. Their visitors got the malware from Optimizely, an address every one of those sites already trusted. Even optimizely.com served it.

Most sites were clean again the same evening. By then, the attacker's crypto wallets had taken in more than $7,000, and nobody knows yet how many card numbers left the sites (Report URI). Optimizely lists the event as a "Web Experimentation Security Incident" on its status page.

How did the attacker get into so many unrelated accounts? Report URI does not know: "a compromised Optimizely system, a compromised credential with cross-customer access, or something else." It is possible that none of the 178 organisations did anything wrong with their own passwords.

Every marketing tool is a door into your site

It is easy to call this an Optimizely problem. It is a bigger pattern.

A/B testing tools, tag managers, chat widgets, pop-up tools and many analytics tools work the same way. You add them to your site once. After that, the tool can change what your site shows and runs, from its own dashboard. That is why marketers like them. You can start a test, add a tracking pixel or change a pop-up in five minutes, without a developer and without publishing the site again.

Developers on Hacker News said it plainly. The top comment: "The whole concept of Google Tag Manager was that you could give marketing departments the ability to add 'tags' to the website without having to involve engineering" (stickfigure on Hacker News).

That is also what makes each tool a door. Anyone who gets into the tool's dashboard can change your site in five minutes, without touching your site and without anyone on your side seeing it. Security people call all the doors of a website together its attack surface. Most designers count the CMS login as a door. Few count the marketing tools.

So the useful question is not "is my website secure?" Your website did not change. The useful question is: who can change the code my visitors run?

Your site has more editors than you think

On most marketing sites, the list of people who can change the code is longer than the list of people who can log in to the CMS.

Where the code comes fromWho can change it
Your site's own pages and filesThe people with access to your CMS or your code
A tag managerEveryone with a login to the tag manager, every tool connected to it, and the vendor
An A/B testing toolEveryone with a login, every API key, and the vendor
A chat widget, a pop-up tool, an analytics scriptEveryone with a login, and the vendor

Think about a site you handed over to a client two years ago. The client's marketing team added a tag manager. A former agency still has a login. A freelancer set up an A/B test and moved on. Each of those logins can change what every visitor runs. Nobody reviews it, and nobody gets an email when it happens.

One developer on Hacker News described the loop: "when you do remove these tags, marketing forgets they exist and are like 'Oh we don't use that anymore'" (etoxin). Another: "Your marketing department is putting in 30 trackers, changing monthly" (goalieca).

You cannot control Optimizely's security. You can decide how many tools like it your site has.

How to find who can change the code on your website

You do not need to be a developer for most of this. Do it once for each site you run, and write the answers in the client's handover document.

  1. List every outside script. Open the site in Chrome, right-click and select View page source. Search for <script. Each src= address that is not your own domain is a vendor that can run code on your site. Check the home page, a blog post and every page with a form, because some tags load only on some pages.
  2. Find the dashboard behind each script. Write down the tool, the account it belongs to and who pays for it. If nobody knows, that is your first finding.
  3. List every login and key. Users, API keys and connected tools. Report URI's first advice to Optimizely customers is to review "who and what has write access" and to change the credentials. Remove the people who left: old agencies, past freelancers, former staff.
  4. Turn on two-factor authentication on every dashboard that can change code. Start with tag managers and A/B tools.
  5. Remove what nobody can explain. A script with no owner and no reason goes. Each one you remove is one less dashboard that can change your site. One developer put the target at "2-3 services tops" (notpushkin).
  6. Check the custom code settings. Tag managers and A/B tools let you add your own code to them, like the setting the attacker used in Optimizely. Open those settings and look at what is there. If you did not add it, find out who did.
  7. Ask your developer to limit where code can come from. A developer can add a setting, called a Content Security Policy, that tells the browser which addresses may load code on your site. Report URI checked 159 of the affected organisations. 68 had no such setting at all. The 24 with a strict one blocked the attack.

Where Splitleaf fits

A Splitleaf site is a folder of files on your computer. Before you publish, Splitleaf shows what will go live. Changes from the AI agent show one by one, for you to keep or undo. Every publish is a commit to a GitHub repository you own (Own your code). When a script tag enters your site, you see it before it goes live, the history shows when it arrived, and you can go back to the version before.

That protects the code in your folder. It does not protect the code behind a script tag. A Splitleaf site can load outside scripts too: the ones you add as head code, and the libraries Splitleaf uses for animations and sliders. If you paste an Optimizely snippet into a Splitleaf site, you review the tag once. What Optimizely sends through it after that, you do not. On 16 November, that site would have served the same malware.

So the checklist above is for Splitleaf sites too. The difference is that the list of people who can change your own files is short and visible: the people with access to your folder and your GitHub repository.

For the server side of the same question, read Time to reduce your website's attack surface.

See how Splitleaf keeps a history of every change

Questions

What happened with Optimizely?

On 16 November, an attacker added malware to the Optimizely Web accounts of 178 organisations, including Zoom, the BBC, CNN and HSBC. Their sites served it to visitors for most of the day. It swapped crypto addresses, took card numbers typed into the sites' own forms, stole cookies and screenshots, and tried to exploit older iPhones and iPads. Cards typed into hosted payment fields, like Stripe's, were out of its reach. How the attacker got access is not known yet.

My site does not use Optimizely. Am I safe?

Not from this pattern. Report URI found an earlier wave from the same attacker, from 13 to 16 November, through scripts from Kissmetrics, StorifyMe and Minute Media. Any outside script with a dashboard behind it can be used the same way.

Does a static website protect against this?

No. A static website removes the doors on the server: no database, no plugins, no admin login. Outside scripts run in the visitor's browser, not on your server. A static site that loads an A/B testing script is exposed in the same way as any other site.

What is a Content Security Policy?

A list your website sends to the browser with each page. It says which addresses may load scripts and where the page may send data. The browser blocks the rest. Of the 159 affected organisations Report URI checked, 24 blocked the attack this way.

I visited one of the affected sites. What should I do?

Report URI gives three steps. Update your iPhone or iPad to iOS 18.7.3 or later, or iOS 26.3 or later. Check every crypto transfer you made on 16 November, because the address you pasted may have been swapped. And watch your card statements if you paid on an affected site.

Keep reading

Recommended next reads