The Optimizely Attack Shows Why Third-Party Scripts Are Your Riskiest Deploy Path
One hijacked testing script reached visitors of CNN, BBC, Zoom and 175+ more. A lead engineer’s analysis of why it worked and what teams should change.
- Topic
- Security
- Reading time
- 5 min
- Length
- 1,561 words
- Published
- Nov 17, 2026
01:38 pm IST
In this article
- What actually happened, in brief
- Why did a testing tool have the power to attack 178 companies?
- Why didn't Content Security Policy stop it?
- Why not just use Subresource Integrity?
- What did the attacker get right, from a technical point of view?
- What should engineering teams change?
- 1. Treat tag managers and experimentation tools as production deploy paths
- 2. Keep third-party scripts off sensitive pages
- 3. Let payment providers handle card data
- 4. Make CSP strict where it counts
- 5. Monitor what actually runs in your users' browsers
- 6. Protect secrets in the browser
- 7. Have a third-party incident playbook
- What should individual users take from this?
- My take
On November 16, 2026, visitors to CNN, the BBC, Zoom and at least 175 other organizations' websites ran an attacker's JavaScript. None of those companies had to be breached. The code arrived through Optimizely, an A/B testing service their pages already trusted. As a lead engineer, I think this is the most important supply chain lesson of the year for anyone who ships web applications.
I've written a full news breakdown of the incident on ByteMuni, with the timeline, payload details and indicators of compromise: Optimizely supply chain attack: what happened and what to check. Here I want to step back and analyse what it says about how we build and govern websites, and what engineering teams should change.
What actually happened, in brief
Optimizely said an attacker "exploited a vulnerability in Experimentation" and used it to add malicious JavaScript to some customer projects. In a statement to Gizmodo, the company said the flaw was in "the Experimentation account signup flow", that it "blocked access to the vulnerable path and deployed a fix", and that affected customers have been notified. It hasn't explained how the flaw worked or how many projects were changed.
Report URI, a script-monitoring company, checked 1,611 Optimizely snippets and found malicious code in 188 of them, belonging to 178 organizations, including CNN, the BBC, Zoom, Salesforce, GitLab, IKEA, HSBC, Equifax and Peacock. It says the real number is likely higher.
The injected code:
- swapped crypto wallet addresses on the page and in the clipboard;
- skimmed card details typed into the site's own form fields;
- on iPhones and iPads, tried to load the Coruna and DarkSword iOS exploit kits.
No iPhone compromise has been confirmed. The attacker's wallets received roughly $6,600 to $7,040, depending on whose count you use, and StepSecurity notes that not every transfer can be tied to victims. Nobody yet knows how many cards were captured.
Those are the facts. The interesting part is why this worked so well.
Why did a testing tool have the power to attack 178 companies?
Because that's how these tools are designed. An Optimizely snippet is a script your page loads from cdn.optimizely.com. It runs with exactly the same privileges as your own JavaScript: it can read the page, change forms, see what users type, and make network requests. It also includes a field called Project JavaScript, which runs custom code on every page load and updates whenever someone changes a setting in the dashboard.
Think about what that means architecturally. You've given an external dashboard, often operated by marketing or growth teams, the ability to push executable code to production, instantly, without a pull request, code review or deployment pipeline. That's a feature, and it's why these tools are popular. It's also a production deploy path most engineering teams don't treat as one.
The attacker didn't need to break CNN's security. They only needed write access to that deploy path. Once they had it, the code was served from Optimizely's real CDN with Optimizely's real certificate, which is exactly what every security control on those sites was configured to trust.
Why didn't Content Security Policy stop it?
This is the part I'd want every frontend lead to understand. Many sites rely on a Content Security Policy (CSP) to control which scripts can run. A typical policy allows cdn.optimizely.com, because the business needs Optimizely.
But the malicious loader came from cdn.optimizely.com. Report URI points out that allowing that host didn't help, and that policies using strict-dynamic or unsafe-eval let the payload run on some sites.
CSP still mattered in one specific way: the loader fetched the main payload from 1688360[.]cc. A strict script-src and connect-src that didn't allow unknown domains would have blocked that second step. Even then, the attacker had a fallback: Report URI found one loader version carrying a full copy of the payload, so it could run even when the external domain was blocked.
The lesson: CSP is valuable, but an allowlist only protects you from other domains. It can't protect you from a trusted domain that has turned hostile.
Why not just use Subresource Integrity?
Subresource Integrity (SRI) lets you pin a script to a specific hash, so the browser refuses to run it if the file changes. It's excellent for static libraries. But experimentation snippets are designed to change every time someone edits a test, so you can't pin a hash to them without breaking the product. That's a genuine trade-off, not an oversight, and it's why tools like this sit outside the usual integrity protections.
What did the attacker get right, from a technical point of view?
Looking at the reported details, a few choices stand out:
- Minimal footprint: the loader was added to Project JavaScript while the rest of each snippet was left intact, so sites kept working normally.
- Evasion: one loader version hid the payload address in base64, so a simple text search for the domain would miss it.
- Resilience: another version carried the full payload in case the domain was blocked.
- Targeted swapping: according to StepSecurity, addresses were only replaced if they passed the chain's checksum and appeared near payment words like "wallet" or "send", which reduces obvious breakage.
- Persistence: Smartsheet's snippet was cleaned and then re-infected with a hidden version, showing the attacker still had write access at that point.
This wasn't a smash-and-grab. It was designed to blend in.
What should engineering teams change?
Here's what I'd put on the roadmap, in order of impact.
1. Treat tag managers and experimentation tools as production deploy paths
Inventory every tool that can change JavaScript on your site: experimentation, tag managers, analytics, chat widgets, personalisation. For each, ask who can publish code, whether there's review or approval, and whether changes are logged. If a marketing dashboard can ship code to production, it deserves access controls at least as strict as your CI/CD pipeline: SSO, MFA, least privilege and audit logs.
2. Keep third-party scripts off sensitive pages
Checkout, login, account settings and payment pages should load as few third-party scripts as possible, ideally none. StepSecurity's advice to keep third-party tags off checkout pages is the single most effective control here. An A/B test on your homepage button colour does not need to run on your payment page.
3. Let payment providers handle card data
The skimmer could only read cards typed into the site's own form fields. It couldn't read cards entered in a cross-origin payment iframe, such as Stripe's hosted fields or Adyen's. If you're still collecting raw card numbers in your own DOM, this incident is a strong argument to move to hosted fields.
4. Make CSP strict where it counts
Use a strict script-src and connect-src on sensitive pages, avoid unsafe-eval, and be careful with strict-dynamic when trusted scripts load others. Turn on CSP reporting. The violation reports are an early-warning system when something tries to reach an unknown domain.
5. Monitor what actually runs in your users' browsers
Server-side security tools never see this attack: your servers are fine, and the malicious code runs in the visitor's browser. Client-side script monitoring, whether a commercial tool or your own periodic fetch and diff of third-party snippets, is how Report URI and others spotted this. If you'd been diffing your snippet daily, the change to Project JavaScript would have stood out.
6. Protect secrets in the browser
The payload could read cookies but not those marked HttpOnly. Session tokens should always be HttpOnly, Secure and appropriately SameSite. Anything readable by JavaScript should be assumed readable by any third-party script on the page.
7. Have a third-party incident playbook
When a vendor is compromised, you need to move fast: identify affected pages, pull or pin the script, search logs for the indicators, rotate credentials for anyone with write access to the vendor account, and decide whether to notify customers. Report URI recommends treating cards entered on affected forms on November 16 as possibly exposed, and considering whether to tell your customers. Write that playbook before you need it.
What should individual users take from this?
As a visitor, you couldn't have spotted this: the sites were real and the scripts came from a real vendor. What helps:
- Update iPhones and iPads to iOS 18.7.3 or later, or iOS 26.3 or later. The exploit kits target older versions.
- For crypto, verify the recipient address on your hardware wallet's screen, not against copied text.
- Prefer wallet payments or virtual cards, and keep transaction alerts on.
My take
The industry spent the last few years hardening build pipelines, code signing and dependency management, and that work matters. But many websites still have a second, quieter deploy path: third-party scripts managed from dashboards outside engineering's view. This attack used that path to reach some of the biggest brands on the internet in a single day.
The fix isn't to ban marketing tools. It's to treat them as what they are: code running in production, with the same governance, isolation and monitoring we'd demand of our own code. If your checkout page loads a script you can't explain, start there.
For the full incident timeline, payload analysis and the indicators of compromise to search your logs for, read the complete Optimizely supply chain attack breakdown on ByteMuni.
Sources: The Hacker News · Gizmodo (Optimizely statement) · CyberInsider (Hudson Rock findings) · Report URI · StepSecurity and Cynet analyses, as reported by The Hacker News
Weekly newsletter
Liked this? Get the next one by email
One short email a week with new articles on React, Node.js, TypeScript and AI engineering. No spam. Unsubscribe in one click.
Further reading
Related tutorials from ByteMuni, my developer publication.
- Cyber SecurityOptimizely Supply Chain Attack: Hijacked Scripts Served Card Skimmers and iPhone Exploits to CNN, BBC and Zoom VisitorsAn attacker abused a flaw in Optimizely Web Experimentation to plant malicious code in scripts loaded by CNN, the BBC, Zoom and 175+ other organizations. Visitors got crypto address swapping, card skimming and iPhone exploit attempts. Here’s what happened and what to check.
- Cyber SecurityChatGPT shared link flaw could expose unshared chatsChatGPT’s shared-link bug exposed private chats through a trusted page component; the fix is live, but MathLive integrations need a compatibility review.
- Crypto Hacks & SecurityPolymarket hack turned a monitoring script into theftPolymarket traders lost funds after a hijacked DebugBear script reused active sessions; the key defenses concern signing access, script integrity and containment.