
Third-Party Scripts on Your Website: What the Optimizely Card Skimmer Did, and a Three-Step Check
On 16 November, 178 companies had card-skimming code on their websites, including Vodafone, HSBC and Levi's Australia.
Nobody broke into those websites.
The attacker got into Optimizely (a tool for testing one version of a page against another), and Optimizely's script was already on every one of those sites. For about 17 hours, that script could read card numbers as people typed them in.
What happened
Optimizely works by loading a script on its customers' pages. That's how it swaps one headline for another and measures which one wins.
The attacker found a flaw in Optimizely's signup form, used it to act as an administrator on customers' accounts, and added their own code to that script. Every site that loaded the script then served the attacker's code to its own visitors.
The code did four things:
- It captured card details typed into the site's own forms
- It swapped cryptocurrency wallet addresses
- It collected cookies
- It took screenshots
The first infected script showed up at about 3:21pm Melbourne time. Almost all of them were clean by about 8:10am the next day.
The security researcher who found it couldn't see how many cards were taken. Optimizely says it has no evidence that personal data was taken, but it can only see when the code loaded, and it can't see what the code captured. HSBC switched Optimizely off across all of its websites.
iTnews has the full report.
Why I moved everything
In May a security researcher on a podcast gave two rules for sensitive data:
- Give it to as few companies as you can
- Ideally only use the giants (Google, Apple, Cloudflare, GitHub etc)
The giants are attacked all day, and they pay huge security teams to deal with it. If one is ever breached, millions of people are hit at once, so you hear about it fast.
A small company might have no security person, and a breach could stay hidden for months. The researcher treats anything he keeps with a small cloud company as something that will leak one day, because an attacker with AI tools and a few weeks to spare gets into most of them.
These are the S-tier. In June I moved everything to (as much as possible) only use them. I host my sites on Cloudflare, code is on GitHub, and Google Cloud for other bits & pieces.
Now, when a build needs a new service, I ask whether one of the giants I already use can do the job.
Your website has the same problem
Every outside script is code another company can change without asking you. When they change it, your visitors get the new version the next time a page loads. You don't approve the change and you don't see it.
These all count:
- Chat widgets
- Heatmaps and session recorders
- Testing tools (Optimizely is one)
- Ad pixels
- Review and pop-up widgets
- Forgotten tags from a campaign that ended two years ago
Optimizely is a big company with banks for customers, and it still happened.
What to do this week
1. List every outside script your site loads. Start in Tag Manager, or ask your developer. You can also see them yourself: open your site in Chrome, right-click, choose Inspect, open the Network tab, reload the page and look at the Domain column. Every domain that isn't yours is another company's code or content.
2. Check who runs each one and whether you still use it. Look hardest at the pages where people type card details or passwords. A heatmap doesn't need to load on your checkout.
3. Remove any you don't use. The chat widget nobody answers can go, and so can the pixel for the platform you stopped advertising on last year.
Or get your brain to make the list
I built a skill that does steps 1 and 2 for you. It's called tag-check, and Ads2AI members can add it today.
Type /add-skill tag-check in your brain, then /tag-check with a web address (yours or a client's). It opens the site the way a visitor would, lists every outside company whose code runs there (including the tags loaded through Google Tag Manager), says what each one does, and flags the ones that look broken, left over or doubled up.
It only reads. It never changes anything on the site.
How many outside scripts does your site load?
When did you last check?