Optimizely and the code delivered to a visitor’s browser.
Security / The story

Optimizely’s fix does not settle what happened in visitors’ browsers

The company says the injected code is gone. Website operators still need to distinguish script exposure from actual theft, and monitoring from protection.

GeekRadar4 min read

Optimizely says it has removed malicious code from affected Web Experimentation projects after an attacker used its service to reach website visitors. The cleanup closes one part of the incident. It does not, by itself, establish what happened in browsers that had already loaded the altered scripts.

In its November 17 incident report, the company attributes the intrusion to a signup-flow flaw that allowed administrator impersonation, rather than stolen customer passwords. It says the flaw was closed on November 16 and injected code removed by 22:24 UTC. Its forensic investigation remains ongoing.

A familiar delivery route carried unfamiliar code

Web experimentation lets a company compare different versions of a page. That requires a powerful integration: code delivered by an external service can change what the visitor sees and interacts with. The permission that makes the product useful also makes its modification a security-sensitive event.

Report URI’s investigation found 188 infected snippets associated with 178 organizations among 1,611 examined. It located the injection in customer Project JavaScript, delivered through Optimizely’s legitimate infrastructure. Its analysis describes wallet-address replacement, card skimming and attempted delivery of iOS exploit kits. Those counts describe discovered scripts and organizations, not a count of infected devices or stolen cards.

The browser therefore did not need to encounter an obviously fraudulent website for dangerous code to arrive. A genuine page could load its expected dependency and receive an altered payload. The trust decision had already been made when the site integrated the supplier.

That also explains why a clean server scan is not an answer to the whole incident. Code running inside a visitor’s page belongs to a different part of the investigation from the files on the organization’s own web server. The two need separate evidence.

The delivery path: altered Project JavaScript passed through the legitimate content delivery network to a visitor’s page. Project JavaScript contains customer-defined code; CDN means content delivery network.
The delivery path: altered Project JavaScript passed through the legitimate content delivery network to a visitor’s page. Project JavaScript contains customer-defined code; CDN means content delivery network.

Unit 42’s analysis recommends removing unnecessary third-party tags from authentication and checkout pages, and isolating payment collection in cross-origin frames. It also calls for auditing project changes and potentially exposed payment activity after containment.

The browser’s same-origin policy restricts one origin’s access to another’s resources. That is why a payment form embedded from a separate origin can create a meaningful boundary, rather than merely a different-looking box. It is not a guarantee that everything surrounding the form is safe: the host page still has its own content, links and scripts.

The Record’s reporting makes the remaining uncertainty explicit: researchers could track cryptocurrency transfers, but could not count all stolen cards, cookies or compromised devices. Loading malicious code and proving a particular theft are different findings. Neither should be substituted for the other when notifying users.

A policy that reports is not a policy that blocks

A Content Security Policy, or CSP, can constrain which resources a page loads. Its actual directives and deployment mode determine the protection. MDN’s documentation distinguishes an enforced policy from a report-only policy, which records violations without blocking them. Merely having a CSP header is therefore an incomplete security claim.

Subresource Integrity answers another question: does a downloaded file match an expected cryptographic hash? A mismatch prevents loading. That is useful for fixed assets, but an experimentation script that legitimately changes needs an explicit update process. Automatically trusting every new hash would surrender the review that the check is meant to preserve.

Our coverage of GitHub’s WFX attacks examines a different execution path, with a related lesson: the artifact visible afterward is not the whole history of what ran.

For website operators, the lasting decision is where experimentation is allowed to operate. A marketing test may justify changing a landing page. Giving the same integration access to a sensitive form deserves a separate decision, backed by a browser boundary that still holds when the supplier makes a mistake.