Source: How F5 caught malicious JavaScript in the Optimizely attack (F5 blog; Blücher, Ambastha, Sun, Han), shared by Ismael G. on 2026-11-19. Vendor write-up; incident figures attributed to industry research.
What happened
On 2026-11-16 attackers exploited a flaw in the account signup flow of Optimizely Web Experimentation and injected JavaScript into customer projects. Optimizely's own integration then delivered that code to visitors of every site using it. Industry research counted 188 infected snippets across 178 organizations, with about 16 hours before cleanup began. The same actor had used at least three other script vendors in the preceding weeks. Optimizely confirmed the incident, fixed the flaw and removed the code.
The payload (track.js) could swap cryptocurrency wallet addresses, skim payment card fields in the Magecart pattern, collect cookies and page content, and push a second stage to iPhone and iPad users. None of the affected companies' servers were breached.
Why the usual controls missed it
Allowlists and Content Security Policy check where a script comes from. The malicious code came from an already approved source. Only about 15% of affected sites checked had a policy that stopped it.
Web application firewalls inspect traffic to your servers. This code went from the vendor straight to the visitor's browser.
The gap: trusting a vendor and monitoring what its code does are separate jobs, and most teams only do the first.
What worked
Browser-side behaviour monitoring flagged the script on a protected site by what it did: reading sensitive form fields, opening network connections to attacker infrastructure, mutating the page, touching cookies and storage. The customer rejected the script, recorded why, blocked the attacker's domains, and restricted the script's access to payment fields.
Blocking the domain alone is not enough: code already loaded can keep executing after the destination disappears. Restricting field access keeps the data out of reach even while bad code runs. The two controls cover each other's gaps.
Tradeoffs
Client-side monitoring adds a script of its own to every page and a console to staff.
Field-level restrictions can break legitimate vendor features that read forms.
Vendor reliance moves from trusting the script vendor to trusting the monitoring vendor.
Failure modes to watch
Approved does not mean safe: every third-party script can read everything on the page, including checkout.
Simultaneous blast radius: one compromised vendor goes live on all its customers at once, without anyone at those companies changing anything.
Learning from the news: without your own telemetry, "did it touch us" depends on someone else's disclosure.
Review checklist
Inventory third-party scripts on checkout and login pages, and what each one can read.
Do you detect script behaviour, not just script source?
Can you restrict a script's access to sensitive fields without removing it?
If a script vendor were compromised tonight, how would you find out?
Do vendor contracts require incident notification with timelines?
Related entries
R163 Java4Shell: another week-of exposure where the inventory question comes first.
R112 Unprompted: agents that leak data with no attacker, F5 Labs' earlier analysis of assumed boundaries.
R161 Inside an AI-run AWS intrusion: correlating behaviour rather than trusting a source.