


After an attack like the Optimizely incident, the CEO asks one short question. Did it touch us?
For most companies, the honest answer depends on a script they didn't write, running in a browser they don't control. Your allowlist did exactly what you built it to do, and that's what made this attack work. The code arrived through a vendor you'd already approved, so the checks on where it came from had nothing to object to. Trusting a vendor and watching its code are two separate jobs, and most security teams only do the first.
One F5 customer did both. Here's what F5 Distributed Cloud Client-Side Defense saw, and what the customer did next.
What happened in the Optimizely attack
On November 16, attackers exploited a vulnerability in Optimizely Web Experimentation and injected malicious JavaScript into customer projects. Optimizely's own integration then delivered that code to the visitors of every site that used it. According to industry research, attackers infected 188 JavaScript snippets associated with 178 organizations, and about 16 hours passed before cleanup began.
The injected code loaded a payload called track.js. It could swap cryptocurrency wallet addresses, skim payment card details, collect cookies and page content, and send a second stage of malicious scripts to iPhone and iPad users. The card skimming followed the Magecart pattern, where malicious code copies payment details from checkout forms. None of the affected companies' servers were breached. The attack played out in their customers' browsers.
This wasn't a one-off. The same attackers had already used at least three other script vendors in the weeks before, which points to a repeatable method. Optimizely has since confirmed the incident, fixed the vulnerability, and removed the injected code.
Why your usual controls missed it
Most sites keep a list of approved script sources, and many add a Content Security Policy to enforce it. Both are worth having. Neither helped much here, because the code came from a source already on the list. In the research, only 15% of the affected sites checked had a security policy that stopped the attack.
A web application firewall couldn't see it either. The attack code never passed through the company's own servers, so a server-side control had nothing to inspect. The better question is what a script does once it runs in the browser, whoever delivered it.
F5 Client-Side Defense complements the controls you already have with protection that monitors JavaScript behavior inside the browser, where the code actually runs. That matters most for organizations that depend on many third-party integrations to deliver their digital experiences.
What Client-Side Defense saw
Client-Side Defense watches JavaScript behavior where it runs, including access to sensitive form fields, network connections, DOM mutations (changes to the page), and cookie and browser storage activity. During the Optimizely incident, it flagged the attacker's script as high risk on a protected customer website.
The customer could see the path from the trusted Optimizely integration to the malicious payload, along with activity involving sensitive form fields, including payment card information, and connections to infrastructure controlled by the attacker. Public incident research linked parts of that infrastructure to the campaign's command-and-control activity, which gave the customer more context for its investigation. That gave the team what it needed to judge its potential exposure and decide what to do.
The customer reviewed the script, rejected it, recorded why, and used Client-Side Defense to block connections to the attacker's domains and restrict the script's access to sensitive form fields.
Why blocking the domain wasn't enough
Blocking the attacker's domains cuts the script off from the people running it. But the Optimizely payload also had an inline version, a full copy of the code sitting inside the trusted snippet. That version can keep executing even after the attacker's domain goes offline.
This is why the second control matters. Restricting a script's access to payment and other sensitive fields keeps that data out of reach even when the code is already running. Blocking the destination and protecting the data cover each other's gaps.
Questions your board will ask next
For security leaders, this incident is a board conversation as much as a technical one. A typical site loads scripts from many outside vendors for analytics, advertising, chat, and testing, and each of them can read everything on the page, including payment forms. Because those scripts run in the visitor's browser, it doesn't matter whether the site is hosted in the cloud, in a data center, or both. The risk travels with the page. When one vendor is compromised, the attack goes live on every customer's site at the same moment, without anyone at those companies changing a thing. Expect questions like these.
- Which vendors can run code in front of our customers, and who watches what that code does?
- If one of them were compromised tonight, how would we find out, and how fast?
- Can we show an auditor that we'd detect unauthorized changes to our payment pages? PCI DSS 4.0.1 requirement 11.6.1 requires it.
- Which of our controls would have stopped this, and which would have stayed quiet?
- Can this run alongside the application protection we already use, or is it one more console to staff?
Those are fair questions, and the answers shouldn't depend on a vendor's own incident report. Client-Side Defense gives your team its own evidence of which script did what, and where, so the answer to "did it touch us" comes from your telemetry and not someone else's disclosure.
A question worth asking tonight
Start with the pages that matter most, like checkout and login. Count the third-party scripts on them. A script inventory or an approved domain list tells you what loads, not what each script does once it runs. Then ask your team one thing: if one of your script vendors were compromised tonight, how would you find out? If the honest answer is "we'd read about it," that's the gap to close. Trust the source, but monitor the behavior.
Learn more about F5 Distributed Cloud Client-Side Defense. Security at F5 doesn’t stop here. See all the ways F5 is protecting organizations against the expanding threat landscape.
About the Authors



Related Blog Posts

Beyond visibility: Six more questions F5 Insight for ADSP helps you answer and act on
Map workloads, easily upgrade software across your F5 BIG-IP fleet safely, and assess post-quantum cryptography readiness with F5 Insight for ADSP v2.0

How are customers using the F5 AI Security Platform?
See why customers are turning to the F5 AI Security Platform for strong, out-of-the-box protection plus the customization they need to meet their specific security needs.

Who can you trust in the age of AI agents?
New features for F5 Distributed Cloud Bot Defense enable organizations to distinguish between trusted and fraudulent AI traffic.

From dashboard fatigue to operational excellence: Why XOps needs F5 Insight for ADSP
Learn how F5 Insight for ADSP lays the visibility foundation for XOps—turning fragmented signals across applications and infrastructure into actionable intelligence.

Govern your AI present and anticipate your AI future
Learn from our field CISO, Chuck Herrin, how to prepare for the new challenge of securing AI models and agents.

F5 recognized as one of the Emerging Visionaries in the Emerging Market Quadrant of the 2025 Gartner® Innovation Guide for Generative AI Engineering
We’re excited to share that F5 has been recognized in 2025 Gartner Emerging Market Quadrant(eMQ) for Generative AI Engineering.