---
type: "post"
id: "lessons-from-the-optimizely-web-experimentation-compromise-794091"
slug: "lessons-from-the-optimizely-web-experimentation-compromise-794091"
title: "Lessons From the Optimizely Web Experimentation Compromise"
description: "Optimizely Web Experimentation was used to serve malicious JavaScript to visitors of customer sites after an attacker gained write access to project code."
retrieval_nugget: "Optimizely Web Experimentation was used to serve malicious JavaScript to visitors of customer sites after an attacker gained write access to project code. Optimizely says it fixed the vulnerability and removed the injected code. The incident shows how a restrictive Content Security Policy can limit damage even when a trusted third-party script is compromised—and why that protection has boundaries."
published_at: "2026-11-20"
updated_at: "2026-11-20"
record_date: "2026-11-20"
date_kind: "published_at"
topics: ["security"]
entities: ["Optimizely","Optimizely Web Experimentation","Report URI","Stott Security","Stott Security for SaaS CMS"]
related_patterns: []
novelty_label: "new_fact"
what_changed: null
prior_refs: []
source_url: "https://world.optimizely.com/blogs/mark-stott/dates/2026/11/lessons-from-the-optimizely-web-experimentation-compromise"
source_urls: ["https://world.optimizely.com/blogs/mark-stott/dates/2026/11/lessons-from-the-optimizely-web-experimentation-compromise"]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:lessons-from-the-optimizely-web-experimentation-compromise-794091"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/lessons-from-the-optimizely-web-experimentation-compromise-794091/","markdown":"https://newruntime.com/posts/lessons-from-the-optimizely-web-experimentation-compromise-794091.md","json":"https://newruntime.com/posts/lessons-from-the-optimizely-web-experimentation-compromise-794091.json"}
markdown_url: "https://newruntime.com/posts/lessons-from-the-optimizely-web-experimentation-compromise-794091.md"
---

# Lessons From the Optimizely Web Experimentation Compromise

## Retrieval answer

Optimizely Web Experimentation was used to serve malicious JavaScript to visitors of customer sites after an attacker gained write access to project code. Optimizely says it fixed the vulnerability and removed the injected code. The incident shows how a restrictive Content Security Policy can limit damage even when a trusted third-party script is compromised—and why that protection has boundaries.

## Summary

Optimizely Web Experimentation was used to serve malicious JavaScript to visitors of customer sites after an attacker gained write access to project code. Optimizely says it fixed the vulnerability and removed the injected code. The incident shows how a restrictive Content Security Policy can limit damage even when a trusted third-party script is compromised—and why that protection has boundaries.

## What happened

Optimizely’s announcement, published by Mark Stott on November 17, 2026, describes an investigation published the previous day by Scott Helme and Report URI. Optimizely Web Experimentation adds a script tag to a customer’s site; that tag loads a per-project snippet from `cdn.optimizely.com`. The snippet can include a Project JavaScript field containing code that runs on pages where the snippet is loaded. An unauthorized party gained write access to Project JavaScript in multiple customer projects and added a loader. Because the code arrived through Optimizely’s normal domain and certificate, it looked like the expected script delivery. Stott relays Report URI’s clarification that this was not CDN cache poisoning: the CDN served the altered content it was given.

Report URI found the loader in 188 snippets associated with 178 organisations, out of 1,611 snippets it checked; the article says the true number was expected to be higher. The injected code appeared as a script reference to `1688360.cc/track.js`, a base64-obfuscated reference, or an inline fallback executed with `eval()`. According to the account, the payload changed cryptocurrency wallet addresses in page text, forms, clipboard contents and outgoing requests. From 13:43 UTC, it also collected payment-card details from forms and sent them using `navigator.sendBeacon`, stole cookies not marked `HttpOnly`, and captured page screenshots. On iPhones and iPads, it loaded additional scripts from two attacker-controlled hosts to deliver exploit kits targeting iOS 13 through iOS 18.

The first injection was observed at 04:21 UTC. Most cleanup occurred between about 20:40 and 21:10 UTC, and the last infected file was cleaned at 23:11 UTC. Some sites therefore served malware for nearly 19 hours. Optimizely acknowledged that an unauthorised party exploited a vulnerability in Experimentation, and said it fixed the vulnerability and removed injected code from affected projects.

Stott’s central technical point is that a Content Security Policy (CSP) allowing `*.optimizely.com` cannot determine whether code from that trusted origin is benign. A restrictive `script-src` can block a newly introduced host such as `1688360.cc`; omitting `unsafe-eval` can block the inline fallback. `connect-src` can restrict where scripts send data, including via `sendBeacon`. Report URI’s review found 68 evaluated sites had no CSP, 50 allowed both payload execution and data theft, 17 allowed execution but blocked the theft, and 24 blocked the payload outright. Wallet substitution could still work on sites that blocked exfiltration, because it happens locally in the page.

The article discusses two policy trade-offs. `strict-dynamic` propagates trust from a nonce- or hash-authorized script to scripts it loads, potentially bypassing host allowlists in supporting browsers. `unsafe-eval` permits strings to execute as JavaScript and may be required by some Optimizely features, but also enabled the fallback on one bank’s site. Stott describes Stott Security, a free MIT-licensed CSP management add-on: version 6 supports CMS 12, version 7 supports CMS 13, and a SaaS CMS edition is in beta and available by early-access request. The CMS editions support separate policies by context and violation reporting; SaaS currently supports a front-end context. The article also recommends report-only mode for gathering violation data before enforcing a policy, while warning that report-only mode itself does not protect visitors.

## What the archive adds

New Runtime’s September 28, 2026 coverage described Cloudflare Page Shield detecting eight malicious payloads across four client-side attacks on live storefronts. That earlier coverage and this incident both point to the risk of third-party code executing with a site’s authority, but the new account focuses on CSP as a control against a compromised experimentation script. This is a new incident that adds a concrete security lesson to a known client-side risk.

## Trend signal

This does not yet fit a pattern New Runtime tracks.

## Why now

The incident had been fixed by the time Stott published his account, but the exposure window and the potential consequences make review of access and browser-side controls timely. The article advises Optimizely customers to review users, API tokens and integrations with write access, rotate credentials where needed, and search existing CSP violation reports for the incident’s indicators from November 16.

## Why it matters

A third-party script runs inside the authority of the site that embeds it. Trusting its delivery domain is therefore not equivalent to verifying every change to the code it serves. The Report URI figures, as relayed by Stott, suggest that policy configuration affected what attackers could do: some sites blocked the payload, while others let it run but prevented data from reaching new destinations. Those are different layers of mitigation, not a guarantee that the page is safe.

For teams, the practical implication is to treat browser policy as an operational control rather than a copied configuration snippet. A narrowly scoped `connect-src` can reduce exfiltration destinations, while a deliberate decision about `strict-dynamic` and `unsafe-eval` determines how trust propagates and whether inline evaluation is possible. Separate policies for editing interfaces and public pages can avoid granting visitors’ pages relaxations needed only by administrators. Reporting adds visibility, but it needs an owner and response path; Stott explicitly notes that an internal violations screen is not an alerting system.

## What happens next

- **More Optimizely customers will review project write access and rotate exposed credentials.** (3 months, 70%). Watch for: Optimizely guidance or customer incident disclosures.
- **Teams with CSP reporting will turn observed third-party domains into explicit review queues.** (6 months, 60%). Watch for: published CSP monitoring or alerting practices.

## Limits and uncertainty

The reported figures describe the snippets and CSPs Report URI checked, not a census of all Optimizely customers or every affected page. Stott says the actual number of affected projects may be higher. The account does not establish how many visitors’ payment details, cookies or screenshots were successfully collected, nor quantify resulting fraud or other downstream harm. It also does not independently verify the attacker’s identity or provide a complete account of how project write access was obtained. The CSP results are observational counts from evaluated sites, not a controlled test showing that a particular policy would prevent every variant of the attack. A payload placed entirely within trusted Project JavaScript could still execute; CSP limits sources and destinations, but does not establish that trusted code is honest.

## Skill to build now

This week, inventory the scripts your public pages trust and test a report-only CSP before enforcing it. In particular, review whether `connect-src` permits destinations beyond the site and services the page actually needs, and whether `unsafe-eval` or `strict-dynamic` is justified for the public front end. Keep editor-only requirements separate from visitor-facing policy where your CMS supports it. When reports identify a new domain, investigate it before adding it to an allowlist; a one-click approval can turn an observed attack destination into a permitted one.

## Reader takeaway

CSP cannot certify that a trusted vendor script is safe, but a restrictive policy can constrain what a compromised script can load and where it can send data. Build and maintain that policy around the needs of the public page, monitor violations, and make exceptions deliberately rather than inheriting broad permissions from an editor or a vendor example.

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Security](https://newruntime.com/topics/security.md): Explore the security topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
