A vendor's script can be turned against its customers, and a one-time review will not notice. On November 16, 2026, malicious JavaScript was added to code that Optimizely serves to its customers' websites. Researchers say 178 organizations were affected, including well-known names such as the BBC, CNN, Zoom, and Salesforce. Most of those sites had not changed a line of their own code. This article explains what happened and what a defender can do, including setting a Content Security Policy.
What happened
Optimizely is a testing and personalization platform. Customers add one small script to their pages, and Optimizely delivers the rest from its own servers.
According to Scott Helme of Report URI, an attacker added code to the custom JavaScript field of customer projects on Optimizely. The first injection he saw was at about 04:21 UTC on November 16, in the BBC's snippet. Helme checked 1,611 Optimizely snippets and found 188 infected, belonging to 178 organizations. He believes the real number is higher, because he could only check the snippets he was able to find in time. Cleanup began at about 20:40 UTC, and by 21:52 UTC only one infected snippet remained. For most sites the exposure was roughly 16 hours.
Report URI and StepSecurity, which analyzed the campaign separately, describe the code doing several things:
- Swapping cryptocurrency wallet addresses for the attacker's. This is the only part Report URI says it could confirm stole money, about $7,040 as of its write-up.
- Capturing card numbers, expiry dates, and security codes typed into a site's own forms. Cards entered in hosted payment frames were not captured.
- Sending page screenshots and certain cookies to the attacker's server.
- On iPhones and iPads running older software, loading browser exploit kits.
The named organizations come from Report URI's research. In the coverage we reviewed, none of the named organizations had publicly commented, so treat the list as the researchers' findings. Optimizely itself has confirmed the incident on its status page. It has also been reported by outlets including The Register and Malwarebytes. A named site loading the affected script does not by itself show that its own servers were breached or that every visitor was infected.
Optimizely's status page says an unauthorized party exploited a vulnerability in its Experimentation product and added malicious JavaScript to some customer projects. According to The Register, Optimizely described the flaw as being in the sign-up process of its experimentation software. Optimizely says it has fixed the flaw, removed the code, and secured affected accounts. It has not publicly explained how the attacker gained write access across unrelated customers, and that part is unconfirmed. Details on the card and exploit components come mainly from Report URI, and StepSecurity says it did not independently analyze the exploit files.
Why third-party scripts are a supply-chain risk
A website can have perfect code, strong passwords, and a clean security review, and still be exposed. Any script the page loads from a vendor runs with the same access as the site's own code. It can read what a visitor types into a form, see what is on the screen, and send data to any server it likes.
That makes every analytics, advertising, chat, and testing tag a quiet dependency. Your security depends on the vendor's security, and on the security of every customer account at that vendor.
Why a one-time review does not help
The file was fine when it was approved. The site owner then changed nothing, and the vendor's file changed anyway. A review last spring says nothing about what loads this afternoon.
The risk is the change, so the control has to watch for change.
Content Security Policy: what it does and does not do
A Content Security Policy (CSP) is a header your web server sends with each page. It tells the browser which sources may supply scripts, and which servers the page may contact. Two directives matter most here: script-src limits where scripts may load from, and connect-src limits where the page may send data. See the MDN guide to CSP.
What it gives you:
- Fewer places for stolen data to go. If injected code tries to send data to a server that is not on your list, the browser refuses. Whether that would have helped at any given site in this incident depends on that site's policy, and we have not verified it.
- A block on unexpected scripts. A script loaded from a source you never allowed will not run.
What it does not give you:
- No protection from a source you trust. A tag service has to be on your allow list to work. If that service is compromised, its script still runs.
- Little protection if it allows
'unsafe-inline'or'unsafe-eval'. Either one lets script injected into a page run, which removes most of the benefit.
Think of it as a seat belt: it limits the damage, and it works best together with knowing what you load. Roll a new policy out in report-only mode first, so you can see what it would block before it blocks anything. Subresource Integrity, which makes the browser refuse a file that does not match a hash you set, is a related control. It only works when the vendor serves a fixed file, and many tag services, by design, do not. See the MDN page on Subresource Integrity. Lavawall's domain scanner lists scripts and stylesheets loaded from a CDN that have no integrity attribute.
What a defender should do
- Take inventory. List every third-party script on every page you run, including those loaded by other scripts. Most organizations are surprised by the number.
- Remove what you do not need. Old marketing tags and forgotten trials are free attack surface.
- Fingerprint each script and alert on change. A new version is not necessarily bad, but you should know about it.
- Treat some changes as urgent. A script that begins reading form fields, reaching card or password inputs, or sending data to a domain it never used before deserves a human look the same day.
- Pin files where the vendor allows it. Use Subresource Integrity for scripts that are a fixed file.
- Set a Content Security Policy, and keep it strict. Limit which outside domains your pages may load from and contact, and avoid
'unsafe-inline'and'unsafe-eval'. - Keep payment entry in hosted frames from your processor. In this incident, that is why some card data was out of reach.
Want to know what your websites load? Book a free 30-minute consultation and we will look at what your public sites load and what changed this week. Learn more about the Lavawall domain scanner.
Book a Free 30-Minute Consultation Learn About the Domain ScannerHow Lavawall helps
Lavawall's domain security scan looks at your website, email, and DNS from the outside. For this problem it does three things:
- Tracks third-party scripts. It fingerprints each script on your monitored websites, shows what it appears to do, and alerts you when a script changes or gains risky abilities such as reading form fields or sending data out. It also notes script versions that are out of date compared with what other monitored sites use.
- Flags missing Subresource Integrity. It lists scripts and stylesheets loaded from a CDN that have no integrity attribute, so a changed file would run unchecked, and suggests adding the attribute or hosting the file yourself.
- Checks your Content Security Policy. It reports when the policy is missing, and when it allows
'unsafe-inline'or'unsafe-eval', on your main site and on your subdomains.
We would not claim this stops an incident like Optimizely's. It does not control the vendor's servers. What it helps detect is the change itself, so a site owner hears about a vendor script that suddenly reads form fields or names a new outside domain, instead of learning about it from the news.
Vulnerable iOS versions
The same incident also targeted phones. According to Google Threat Intelligence Group, the Coruna exploit kit targets iPhones running iOS 13 through 17.2.1. iVerify reports that the DarkSword kit targeted iOS 18.4 through 18.6.2, and recommends updating to iOS 18.7.6 or 26.3.1, which it says mitigate all of the vulnerabilities in these attack chains. Lavawall lists iOS and Android devices from Google Workspace and Microsoft Intune and flags versions that are unsupported or targeted by known exploit kits, including Coruna and DarkSword, so you can find the devices that need updating. Features vary by plan; see plans. You can run the free domain scan to see where your site stands.
Frequently asked questions
What happened in the Optimizely incident?
On November 16, 2026, malicious JavaScript was added to code that Optimizely serves to customer websites. Report URI's Scott Helme checked 1,611 snippets and found 188 infected, belonging to 178 organizations. Optimizely says an unauthorized party exploited a vulnerability in its Experimentation product and added the code to some customer projects, and says it has fixed the flaw and removed the code. How the attacker gained write access across unrelated customers has not been publicly explained.
Why does a clean website still get hurt by a vendor's script?
Any script a page loads from a vendor runs with the same access as the site's own code. It can read what a visitor types into a form, see what is on the screen, and send data to any server it chooses. The site owner's own code can be flawless and the vendor's file can still change underneath it.
What is a Content Security Policy and does it stop an attack like this?
A Content Security Policy (CSP) is a response header that tells the browser which sources a page may load scripts from and which servers it may send data to. It reduces what injected code can do and limits where stolen data can go. It does not stop a script that comes from a source you have allowed, so a compromised vendor on your allow list still runs. A policy that allows 'unsafe-inline' or 'unsafe-eval' removes most of the protection. Lavawall's domain scan reports a missing policy and a policy with those unsafe directives.
How do I find out which third-party scripts my website loads?
List every script on every page, including scripts loaded by other scripts, then remove what you no longer need. Lavawall's domain scanner tracks third-party scripts on monitored websites, fingerprints each one, and alerts when a script changes or gains risky abilities such as reading form fields or sending data out.
What is Subresource Integrity, and does Lavawall check for it?
Subresource Integrity (SRI) is an attribute on a script or stylesheet tag that holds a hash of the file. If the file the browser receives does not match, the browser refuses to run it. It only suits files that stay fixed, so it does not fit tag services that change their code by design. Lavawall's domain scan lists scripts and stylesheets loaded from a CDN that have no integrity attribute.
Does Lavawall check for vulnerable iOS versions?
Yes. Lavawall lists iOS and Android devices from connected Google Workspace and Microsoft Intune accounts and helps detect versions that are unsupported or targeted by known exploit kits, including Coruna and DarkSword. Researchers recommend iOS 18.7.6 or 26.3.1 or later. Features vary by plan.
About ThreeShield and Lavawall®
ThreeShield Information Security Corporation is a Calgary-based advisory and audit firm. ThreeShield builds, owns, and operates Lavawall®, a multi-tenant IT and security platform for MSPs and IT teams. This article was written by Chris Nowell, CISSP, CISA.
Sources
- Optimizely status page, "Web Experimentation Security Incident".
- Report URI, "World's Largest Brands Infected With Malware Via Optimizely".
- StepSecurity, "OPTIMJACK".
- Sophos, "Hijacked Optimizely snippets served malicious code on major websites".
- The Register, "Optimizely hack turns world's biggest websites into malware dispensers".
- Malwarebytes, "CNN, BBC, Zoom, and other sites served malicious code in supply-chain attack".
- Google Cloud Threat Intelligence, Coruna iOS exploit kit.
- iVerify, "DarkSword iOS exploit kit explained".
- The Hacker News, "Coruna iOS exploit kit uses 23 exploits".
- Help Net Security, "DarkSword: Researchers uncover another iOS exploit kit".
- MDN Web Docs, Content Security Policy (CSP).
- MDN Web Docs, Subresource Integrity.
Last reviewed . This article reflects public sources available on 17 November 2026 and may be updated as researchers publish more. No control prevents every attack.