On Monday 16 November, attackers used Optimizely, a tool companies load on their websites to run A/B tests, to serve malicious JavaScript to visitors of at least 178 organisations. Among them were the BBC, Zoom, TalkTalk and 32 banking and finance brands, including HSBC sites in more than ten countries, Equifax UK and Funding Circle. None of those organisations had their own systems breached. Their websites loaded a script from a supplier, and the supplier’s delivery had been tampered with.
That is the uncomfortable part for a regulated firm. Your customers don’t see a supplier; they see your login page. This Insight covers what happened, which browser controls would have stopped the theft, why some popular settings would not have, and how to set the right ones up on AWS.
What happened
| Detail | |
|---|---|
| Discovered | Monday 16 November 2026, by UK security firm Report URI |
| How | Optimizely says an unauthorised party exploited a vulnerability in its Experimentation product to add JavaScript to some customer projects (The Register). A spokesperson told Gizmodo the flaw was in the account sign-up flow |
| Timeline | First malicious code at 04:21 UTC; mass clean-up from about 20:40 UTC. Most sites were exposed for about 16 hours (StepSecurity) |
| Scale | 188 malicious scripts out of 1,611 Optimizely scripts examined, across at least 178 organisations, including Optimizely’s own website and login portal |
| What the code did | Swapped copied crypto wallet addresses; captured card details typed into payment forms; took screenshots and read non-protected cookies; tried to exploit iPhones and iPads on older iOS versions |
| Known losses | About $7,000 in crypto traced to the attackers on the day; how much card data was taken is not known |
| Status | Optimizely says it has fixed the vulnerability, removed the code, revoked tokens and notified affected customers |
The full list of affected organisations is in Newsweek’s report.
One detail matters more than the rest. StepSecurity’s analysis of the payload found the card skimmer could not read card fields inside a cross-origin payment iframe. Firms whose card fields sat on their own page were exposed; firms that let their payment processor host the fields were not.
“We weren’t hacked” is not much comfort
A third-party script loaded into your page runs with the same access as your own code. It can read every field, change what the page shows and send data anywhere the browser allows. Under the shared responsibility model, what your web pages load is your responsibility, not AWS’s and not your visitor’s.
Two rulebooks point the same way. PCI DSS v4.0.1 requirements 6.4.3 and 11.6.1, in force since 31 March 2025, require merchants whose own pages can affect the security of a payment to inventory, authorise and integrity-check every script on the payment page, and to detect unauthorised changes to it (PCI Security Standards Council). And for FCA-regulated firms, a supplier that can put code on your login or payment pages is part of the chain behind an important business service, which is exactly what operational resilience mapping is meant to capture.
What a content security policy would, and wouldn’t, have done
A content security policy (CSP) is a response header that tells the browser which sources a page may load scripts from and where it may send data. In this attack, the exact settings decided whether it helped.
According to StepSecurity, the attacker wrote a small loader into each project’s custom JavaScript, which Optimizely’s CDN then served under its own certificate. The loader pulled the main payload from a separate domain the attacker had registered that morning, and the payload sent stolen card data and screenshots back to that domain.
- A host allowlist in
script-srcthat names Optimizely but not the attacker’s domain blocks the payload download. It isn’t complete on its own: one loader variant carried a full inline copy of the payload as a fallback. - A
connect-srcallowlist blocks the theft itself. The skimmer sent card data withnavigator.sendBeacon, whichconnect-srccontrols, so a page that only allows its own and its suppliers’ endpoints stops the data leaving even if the code runs. - A nonce with
'strict-dynamic'does not block the loader, because it trusts any script that an already-trusted script adds.
Optimizely’s own CSP guidance shows both sides. Its suggested connect-src is narrow, limited to Optimizely’s hosts, and a site that kept it that way would have blocked the exfiltration. Its suggested script-src relies on a nonce and 'strict-dynamic', which would not have stopped the loader. A site that loosened connect-src to make other tools work, or allowed https: everywhere, had no protection at all.
The controls that would have limited it
| Control | What it stops | What it doesn’t stop | Effort |
|---|---|---|---|
| Keep testing, analytics and marketing scripts off login and payment pages | Removes the route entirely on the pages that matter | Anything on other pages | Low: change where the tag loads |
| Card fields hosted by your payment processor (cross-origin iframe or redirect) | Scripts on your page reading card details | Wallet swaps, or data in your own form fields | Low to medium |
CSP with a script-src host allowlist and tight connect-src and img-src | Payload downloads and data sent to servers you haven’t listed | Code inlined into an allowed supplier’s file from running | Medium: start in report-only |
| Subresource Integrity (SRI) | A static third-party file being altered | Scripts that change by design | Low, for static files |
| A pinned, reviewed copy of a dynamic snippet | Unreviewed changes to a supplier’s script | A live proxy of the supplier’s file: sites serving Optimizely from their own domain were still hit | Medium |
| Script inventory and change monitoring | New or changed scripts going unnoticed (PCI DSS 6.4.3 and 11.6.1) | Nothing on its own: it detects, it doesn’t block | Medium, ongoing |
SRI deserves a note. It puts a hash of the expected file in the script tag, and the browser refuses to run anything that doesn’t match (MDN). That suits a pinned library version, but StepSecurity points out it is impractical for a testing snippet that changes with each experiment. Optimizely documents self-hosting the snippet and checking its integrity at the edge, and the difference matters: a copy you have reviewed and pinned protects you, while a setup that simply fetches Optimizely’s latest file and serves it from your domain passes an attack straight through.
Setting it up on AWS
If your site sits behind Amazon CloudFront, the headers need no application change.
- Create a response headers policy with a Content-Security-Policy value (AWS documentation). The setting takes up to 1,783 characters, which pushes you to keep the list of allowed sources short.
- Start in report-only. CloudFront’s security header setting sends an enforcing policy. To trial a policy without breaking pages, add
Content-Security-Policy-Report-Onlyas a custom header in the same policy, collect violation reports for a week or two, then move the tuned policy into the enforcing setting. Try this on a non-production distribution first. - Give sensitive paths a stricter policy. A response headers policy is attached per cache behaviour, so
/login*,/account*and/checkout*can carry a tighter CSP than the marketing pages, one that doesn’t allow testing or advertising sources at all. - Decide who owns the header. Each header has an origin override setting. Turn it on if CloudFront’s policy should win over anything the application sends; leave it off if developers manage CSP in the application and CloudFront is the fallback.
- Send reports somewhere someone reads them. Add a
report-uriorreport-todirective pointing at a collector, either a hosted service or a small API Gateway and Lambda endpoint writing to CloudWatch, with an alarm on a spike in violations. On 16 November, a spike in blocked requests to an unknown domain was the signal.
Five checks for this week
- List every third-party script on your login, account and payment pages. Your browser’s developer tools (the Network tab, filtered to JavaScript) show them in a minute.
- For each one, write down who added it, why that page needs it, and who would notice if it changed.
- Check whether your card fields are hosted by your payment processor in a cross-origin iframe or rendered by your own page.
- Read your current CSP, if you have one. If
connect-srcallowshttps:or*, it isn’t limiting where data goes, and'strict-dynamic'meansscript-srcisn’t limiting what loads. - If you use Optimizely Web: inspect every project’s Project JavaScript field (including base64-encoded and inline variants), review users and API tokens, search logs back to 04:00 UTC on 16 November for the payload domains StepSecurity lists, and treat cards entered or wallet addresses copied on affected pages between about 04:00 and 21:00 UTC that day as compromised.
A supplier’s script on your login page is part of the service your customers rely on, and part of what the FCA expects you to have mapped. If you would like help mapping the dependencies behind your important business services, including the ones that live in the browser rather than in your AWS account, see our disaster recovery and resilience service.