Optimizely’s personalization service began serving JavaScript that had been tampered with to inject a multi‑payload malware suite into pages of 178 sites, including major media and SaaS platforms. The malicious code was signed with a valid Optimizely certificate and delivered from cdn.optimizely.com, making the compromise appear legitimate to browsers and to site operators.
What Changed in the Third‑Party JavaScript Supply Chain
Customers normally embed a snippet that combines Optimizely’s core code with any custom logic they provide. Attackers inserted additional malicious components into the portion of the snippet that Optimizely serves, allowing the code to run on every page a customer publishes. The altered script performed several actions: swapping cryptocurrency wallet addresses, skimming payment‑card data, exfiltrating cookies and screenshots, and delivering iOS exploit kits (identified as Coruna and DarkSword) to iPhone and iPad browsers.
Implications for Cloud and Platform Engineers
Because the compromised script was delivered from Optimizely’s CDN with a valid TLS certificate, traditional network‑level checks (e.g., certificate validation) would not flag the payload. Engineers relying on third‑party script hosting must recognize that a trusted signing authority does not guarantee runtime safety. The incident also demonstrates how a single supply‑chain breach can affect a large, diverse set of downstream services, amplifying risk across the ecosystem.
Operational Safeguards to Consider
- Implement strict Content‑Security‑Policy (CSP) directives that limit script sources and require nonce or hash verification for inline code.
- Adopt Subresource Integrity (SRI) where feasible to bind a cryptographic hash to external scripts, acknowledging that SRI must be updated when legitimate script changes occur.
- Monitor CDN traffic for unexpected changes in script size, response headers, or execution patterns using runtime security tooling.
- Establish a review process for third‑party script updates, including automated diff checks against known good versions.
Related CloudNinjas coverage: security.
What This Means For Practitioners
Teams should treat third‑party JavaScript as a mutable attack surface and incorporate integrity verification, runtime monitoring, and strict CSP controls into their deployment pipelines. Regular audits of external script providers and rapid response playbooks for supply‑chain incidents are essential to limit exposure from similar compromises.

