A website can remain online, serve its pages normally and show no unauthorized login to its own servers while delivering malicious code to visitors.
That is the important lesson from the November 16 compromise of Optimizely Web Experimentation, a service used to test and personalize websites. Security researcher Scott Helme and Report URI found malicious JavaScript in 188 Optimizely snippets associated with 178 organizations. The researchers identified sites connected to companies including CNN, the BBC, Zoom, Salesforce, GitLab, IKEA, HSBC, Equifax and Ledger.
The number is a researched sample, not a complete victim count. Report URI examined 1,611 snippets it could locate, and said the real number could be higher. Optimizely said an unauthorized party exploited a vulnerability in its Experimentation service, inserted malicious JavaScript into some customer projects, fixed the vulnerability and removed the injected code. The company also said it secured affected accounts and added protections against further unauthorized delivery. Its public notice does not establish how many visitors were affected or how many organizations suffered confirmed data theft. Optimizely’s incident updates and the available technical reporting should therefore be read as the beginning of an investigation, not its conclusion.
The code was delivered through a trusted path
Optimizely Web normally works by having a customer place a JavaScript snippet on its website. The snippet is served through Optimizely’s content-delivery infrastructure and runs experiments, personalization and other customer-configured functions in the visitor’s browser.
Customers can also add custom code through a field called Project JavaScript. According to Report URI’s technical analysis, the attacker inserted malicious code into that customer-project layer while leaving the rest of the snippet intact. The files continued to come from an Optimizely-controlled domain and carried the expected certificate.
That distinction matters. The browser did not necessarily receive code from an obviously suspicious website. It received altered code from a service the affected organization had deliberately authorized.
The reported payloads included a cryptocurrency-address swapper, a payment-card skimmer, cookie and screenshot collection, and code that attempted to load iOS exploit kits. The Hacker News reported that the card-skimming code could capture card numbers, expiration dates and CVVs entered into ordinary page fields, while cross-origin hosted payment fields such as those used by some payment providers were not readable by the same mechanism. The reporting did not establish that every visitor was infected, that every card was stolen or that the iOS exploit chain successfully compromised a physical device. The Hacker News account describes the difference between delivered capability and confirmed compromise clearly.
A normal server does not mean a normal browser
Most website security programs are organized around systems the company owns: web servers, databases, cloud accounts, application programming interfaces and identity services. Those systems remain important, but the modern website is also assembled in the browser from outside components.
Analytics tools, advertising networks, payment integrations, chat widgets, tag managers, personalization systems and experimentation platforms can read page content, observe user actions and send information elsewhere. On a login, account or checkout page, a third-party script can have practical access similar to that of a privileged employee, even if the company did not write the code and cannot directly inspect every change.
That creates a security boundary that is technically real but often administratively invisible.
Server logs may show a page loading normally, a customer completing a transaction and no unauthorized connection to the company’s infrastructure. The malicious behavior may exist only in the browser. A script can copy a card number before submission, replace a cryptocurrency address, collect a session token, take a screenshot or load another script from an external domain.
This is why the organization’s own servers can remain uncompromised while its customers are still exposed. The event is not best described as 178 separate websites being hacked. It is a vendor-side compromise that used a legitimate delivery channel to change what those websites gave visitors.
Trusting the domain is not trusting the code
HTTPS would not have solved this incident. HTTPS helps authenticate and protect the connection to the requested domain. It does not certify that the JavaScript served by a reputable vendor is benign today.
That is the same distinction I examined in WBC’s coverage of Chrome’s HTTPS warning: transport security is valuable, but it is not a trust machine. A secure connection to a legitimate domain can still deliver code that has been altered upstream.
Content Security Policy can reduce the damage, but it is not a universal answer. A policy that allows a vendor’s script to execute may still permit compromised output from that vendor. Report URI said organizations using enforcement-mode policies could have blocked important parts of the attack, particularly connections to external payload domains. That is a useful control, not proof that CSP would have stopped every stage or every version of the payload.
Subresource Integrity is also difficult to apply to continuously changing experimentation code. It works best when an organization knows the exact file it expects to load and can reject changes that do not match an approved cryptographic hash. An experimentation service is designed to change content. That does not make integrity controls impossible, but it makes them a design and operating decision rather than a checkbox.
Exposure, execution and compromise are different events
The most important discipline in the aftermath is to keep several terms separate.
- Script exposure: a visitor’s browser received an altered file.
- Execution: the browser ran some or all of the malicious code.
- Data access: the code reached information such as a form field, cookie or page content.
- Confirmed compromise: investigators have evidence that information was stolen, an account was misused or a device was successfully exploited.
Those events can overlap, but they are not interchangeable. The presence of an affected script does not prove that every visitor entered sensitive information. Visiting an affected website does not by itself prove that a device was compromised. Conversely, removing the script does not prove that no data was collected while it was active.
Organizations that used Optimizely Web should preserve copies of current and historical project code, review Project JavaScript and experiment-level custom code, examine account and API-token changes, rotate credentials with write access, and compare browser, content-delivery, Content Security Policy, authentication and payment-provider logs. They should also determine whether sensitive forms were present on pages that loaded the snippet.
Visitors who entered card details or used cryptocurrency functions on affected sites during the exposure period should monitor accounts and verify transactions. People using older Apple software should install available security updates. Those are reasonable precautions, not evidence that every visitor was attacked.
The marketing stack is software infrastructure
Companies often classify experimentation and marketing tools as business tooling rather than infrastructure. That is increasingly inaccurate.
If a service can execute code on a customer-facing page, alter what users see, observe interactions, affect payment flows or connect to account data, it belongs in the organization’s software inventory and security review. Its risk should not be delegated entirely to a marketing department because the product is used to measure conversions.
The organization should be able to answer five basic questions:
- What third-party scripts run on each page?
- What information can each script read or modify?
- How does the organization detect unexpected changes?
- Can it block connections or behaviors that were not approved?
- Can it reconstruct what visitors received after an incident?
Many organizations will struggle with the fifth question. Vendor logs may be incomplete. Customer-project snapshots may not be retained. The same script may appear across regional sites, mobile versions and locally cached copies. A company may remove the vendor from its pages before determining which visitors received the altered code.
This is the browser-side version of the inventory problem discussed in WBC’s reporting on connected-device inventories. There, the question was whether an agency knew what devices existed on its network. Here, the question is whether a company knows what programs it has authorized to run inside its customers’ browsers.
What companies should change
The answer is not to remove every third-party script. Modern websites depend on outside services, and some provide real value. The answer is to treat those services as software dependencies with defined privileges, owners and recovery procedures.
- Maintain a page-level inventory of third-party scripts and the data each can access.
- Separate experimentation and analytics code from login, payment and account-recovery pages where possible.
- Use Content Security Policy in enforcement mode, with narrowly defined script and connection destinations.
- Monitor script hashes, behavior and external connections rather than checking only whether a vendor’s domain is reputable.
- Require vendors to preserve project-change logs and provide usable forensic support.
- Define who owns the risk: marketing, engineering, privacy, security or a named combination of those teams.
- Test the ability to disable a vendor quickly without taking the entire website offline.
None of these measures eliminates vendor risk. They make the risk visible, constrain what a compromised service can do and improve the chances of determining what happened afterward.
The important line from the Optimizely incident is not that a vendor was compromised. Vendors will be compromised.
The important line is that a company’s website can continue to look normal while visitors interact with a different program than the company believes it deployed. The code underneath the interface is part of the product. It must be inventoried, monitored and recovered like one.













