You Weren't Breached. Your Website Was Anyway: The Optimizely Attack and the Scripts You Don't Own
On 16 November, visitors to the websites of Zoom, Salesforce, GitLab, HSBC, CNN and the BBC loaded code that could swap cryptocurrency wallet addresses, skim card numbers, steal cookies and take screenshots. On iPhones and iPads it went further and pulled in exploit kits. According to TechTarget, attackers had injected it into 188 Optimizely Web snippets belonging to 178 organisations, and it ran from roughly 04:00 to 21:00 UTC before most of it was pulled.
Here is the part worth sitting with. None of those 178 organisations had their own servers broken into. The code arrived through a website experimentation tool they had chosen, served from the vendor's own content delivery network with a valid certificate. Optimizely says an unauthorised party exploited a vulnerability in its Experimentation product to add JavaScript to some customer projects, and that the flaw is now fixed. Every one of those websites did exactly what it was told to do. That was the problem.
Your website is mostly other people's code
Most SME owners think of their website as a thing their agency built. In practice, the page a customer sees is assembled in their browser from a dozen sources: analytics, an A/B testing tool, a chat widget, a cookie banner, a booking plug-in, a marketing pixel or three. Each of those tags is a standing instruction to the visitor's browser: run whatever this other company serves today.
That is why "we weren't breached" is the wrong question. The right one is who can change the code that runs on your pages. For the Optimizely customers, the answer turned out to include an attacker who never touched their infrastructure. Report URI's analysis, from the team that found the campaign, shows the malicious loader sat in each project's custom JavaScript field while the rest of the snippet stayed untouched. Nothing about the URL changed. Anyone checking that "the Optimizely script" was present would have seen a perfectly normal page.
Large brands at least have security teams who can name the tags on their checkout page. In the SMEs we see, tags tend to be added by whoever runs marketing, often through an agency login that nobody has reviewed since the campaign ended. That is an attack surface, and it rarely appears on anyone's asset register.
This was not a big-company problem
It would be easy to read the victim list as a roll-call of global brands and move on. Look closer and Report URI's list includes HSBC's Singapore insurance site and Levi's Singapore, along with HSBC sites in Hong Kong, Malaysia and the Philippines and a long tail of Australian firms. The attacker did not pick them. They were simply customers of the same tool on the same day.
That is the defining feature of a supply-chain attack, and it is why size offers no cover. The money stolen was modest: Report URI counted about US$5,489 in Bitcoin receipts before the attacker emptied the wallets. The reach was enormous. Next time the compromised vendor may be a chat widget or a review plug-in that is far more common on small business sites than an enterprise experimentation platform.
The usual defences mostly didn't fire
The comfortable answers do not hold up well here. Subresource Integrity, which pins a script to a known hash, is impractical for snippets that change with every experiment, as StepSecurity's analysis notes. Self-hosting the file did not help either: some victims were infected while proxying the live vendor file through their own domain.
Content Security Policy, the browser rule that limits which domains a page may load scripts from and send data to, did better, but only where it was set up properly. Of the 256 affected hosts Report URI checked, 68 had no policy at all and 50 had one that allowed both the payload and the theft. Only 24 blocked the payload outright. Policies that permitted unsafe-eval lost, because the attacker shipped a fallback that ran through eval. Policies that tightly restricted where the page could send data stopped the card, cookie and screenshot theft even when the payload itself ran. The lesson is that a header that merely exists is not the same as a control that works.
If you take card payments, there is also a compliance angle. PCI DSS requirements 6.4.3 and 11.6.1 expect every script on a payment page to be authorised, justified and inventoried, with a mechanism that alerts on unauthorised changes. Merchants who rely on a payment provider's embedded form are not as far off the hook as they may think: the January 2025 revision of SAQ A added an eligibility condition that the merchant's site is not susceptible to script-based attacks, and in practice meeting it means doing much the same work.
For Singapore firms, the PDPA points the same way. The PDPC's guide to data protection practices for ICT systems is explicit that organisations remain accountable for personal data processed by data intermediaries on their behalf. A customer typing their details into your form is giving them to you, whichever vendor's script happens to be listening.
What an SME should actually do
Start with an inventory, and make it about write access rather than names. For every third-party script on your site, record who added it, why it is still there, and which outside accounts can change what it serves. Agency logins, former staff and long-finished campaigns are where you will find the surprises. Remove what nobody can justify; most sites carry tags that stopped earning their keep years ago.
Then clear your sensitive pages. Login, checkout and account pages need very little beyond your own code and your payment provider. Take the marketing and testing tags off them, and use hosted payment fields that sit in the provider's own frame, which StepSecurity notes the skimmer could not read.
Next, deploy a Content Security Policy in report-only mode for a few weeks, learn what your pages really load, then enforce it. Keep unsafe-eval out, and restrict where pages may send data, not only where scripts may come from. Add monitoring that tells you when a script on a sensitive page changes, so you hear about it before your customers' banks do.
Finally, write it into your vendor relationships. Ask tag and widget providers how they would tell you about an incident like this one, require multi-factor authentication on every account that can publish code to your site, and remove access the day a contract ends. As Scott Helme put it, "trusted JavaScript doesn't always remain trustworthy." Your job is to notice when it stops.
Belian Advisory's external attack surface reviews map the third-party scripts and vendor accounts that can change what your customers see, so you know what you are trusting before an attacker tests it; if that list doesn't exist yet, get in touch.