Fluxtail
Security

Optimizely Malware: What the Injected JavaScript Evidence Shows

Understand the Optimizely malware report, confirmed JavaScript injection, visitor-impact limits and safe checks for CSP reporting and enforcement.

By Fluxtail Engineering

Optimizely Web Experimentation lets businesses test different versions of a website. Customers embed a project-specific JavaScript snippet that changes pages in visitors’ browsers. Its Project JavaScript feature also lets customers add reusable custom code without deploying changes to their own website. That delivery path became the route for malicious code in the incident reported on November 16, 2026. Optimizely’s snippet documentation

In his original investigation, Scott Helme of Report URI described attacker-written code inserted into customer Project JavaScript. The surrounding snippet still arrived through the expected Optimizely delivery path. Report URI found 188 infected snippets associated with 178 organisations among 1,611 snippets checked, including snippets delivered through customer domains. Those are findings from its sample, not a complete count of affected customers or visitors.

The reported payload could replace cryptocurrency addresses, capture payment-card details entered into page forms, and collect readable cookies and screenshots. Report URI also described delivery of iOS exploit kits. These findings explain why the Optimizely malware incident matters: code in a trusted website dependency can act inside the page where visitors enter information. They do not establish that every visitor ran every payload feature, lost data or suffered successful device exploitation. Report URI reported cryptocurrency receipts but could not count stolen cards or cookies. Report URI’s analysis

Optimizely subsequently confirmed that an unauthorized party exploited a vulnerability in Experimentation to add malicious JavaScript to some customer projects. Its November 17 statement said it had fixed the vulnerability, removed the injected code and taken steps to secure affected accounts. The statement identifies Web Experimentation’s Snippet Delivery component, but does not publish a software version range, complete exposure window or visitor-level impact assessment. Optimizely’s incident statement

What the incident evidence establishes

Report URI says it preserved infected files together with response headers, fetch times and SHA-256 hashes—fingerprints that identify particular file contents. That supports checking what a captured snippet contained at a recorded time. Optimizely’s separate confirmation establishes unauthorized injection into some projects. Neither source provides a complete record of what happened in every visitor’s browser.

The distinction matters for a third-party JavaScript supply chain attack. A website can deliver its own unchanged HTML while an external dependency supplies different code. Allowing the dependency’s hostname does not authenticate each new version of its contents.

The following observations are all UTC and come from Report URI’s investigation, except the vendor statement:

Time Reported observation
November 16, 02:21 Last clean BBC snippet capture identified by Report URI.
November 16, 04:21 First observed Optimizely injection in that timeline.
November 16, 19:24–19:59 Sweep initially found 186 infected snippets among 1,611 checked; the final reported infected sample reached 188.
November 16, 21:52 Report URI found injected code remaining in one of those 188 snippets.
November 17, 01:02:57 Optimizely posted its monitoring statement confirming the injection and describing its response.

The BBC captures are observations of one delivery path, not universal start and end times. Likewise, a clean snippet fetched after removal cannot establish what an earlier visitor received. Ordinary application logs may help establish page requests, but usually do not record the JavaScript response supplied by a third party or its later browser actions.

How to check browser-policy evidence on your own site

These checks apply to website operators assessing third-party scripts and their Content Security Policy, or CSP. CSP tells the browser which resources a page may load or execute. The test below helps establish current policy behavior and reporting delivery. Historical exposure still requires preserved incident evidence; a successful policy test cannot reconstruct earlier browser activity.

Preserve project and script evidence

Record which Optimizely project IDs appear on each relevant site and page. Preserve available project history, access records, deployed HTML and existing script captures before changing configuration. Keep original response headers and collection times with each captured file, and calculate a hash so later comparisons refer to the same bytes.

Treat suspected malicious JavaScript as evidence. Do not open it as an executable page or follow its external destinations. Work from preserved captures and the vendor’s incident guidance rather than fetching attacker infrastructure.

Separate three questions in the incident record: whether a project contained injected code, whether a particular browser received or executed it, and whether an action caused harm. A snippet capture can answer the first question for its collection time. Browser captures and other records may help answer the others. Missing records leave uncertainty; they do not establish safety. The guide to reading logs during an incident explains how to keep time windows and evidence limits explicit.

Compare report-only and enforced policies

Use an isolated test page and a harmless script on two HTTPS origins you control. Do not run this experiment on a checkout page or use any incident payload. Replace the example hostname below with your owned script origin.

Serve this page from the first origin:

<!doctype html>
<meta charset="utf-8">
<title>Browser policy check</title>
<p id="policy-marker">Script has not run</p>
<script src="https://scripts.example.net/policy-marker.js"></script>

Serve this original script from the second origin with a JavaScript content type:

document.getElementById("policy-marker").textContent =
  "Harmless policy test script ran";

First deliver the page with this HTTP response header. The relative reporting endpoint must belong to your test page’s origin and accept CSP reports:

Content-Security-Policy-Report-Only: script-src 'self'; report-uri /csp-test-report

Then make a separate page response with the identical policy under the enforcement header:

Content-Security-Policy: script-src 'self'; report-uri /csp-test-report

For this comparison, inspect the actual response headers and ensure no other CSP is changing the result. An existing enforced policy still applies when a report-only policy is added. Do not weaken production headers to simplify the experiment.

The cross-origin script is outside script-src 'self'. With only the report-only policy, the expected result is a violation report while the marker changes. With enforcement, the expected result is a blocked script and an unchanged marker. These are expected outcomes to verify, not measurements from a completed browser test. Record the browser and version, response headers, marker text, network result and report disposition for each run. CSP policy delivery and reporting

The example uses the older report-uri mechanism for a small test. It is deprecated in favor of report-to; browser support and delivery differ. A Reporting API configuration uses a named endpoint and a different report envelope. A collector must distinguish legacy csp-report objects from Reporting API report arrays rather than assume one JSON shape. Delivery can be delayed or absent, so inspect browser results as well as received reports. CSP reporting directives

A report-only policy does not block. An enforced policy that permits a compromised script origin can still allow its code. Restricting connect-src can limit certain outbound connections, but does not stop already-running JavaScript from changing page contents. With strict-dynamic, trust granted to an authorized script can extend to scripts it loads. None of these settings is a universal prevention claim for this incident. MDN’s CSP explanation

Search sanitized test reports

Receive browser reports at an endpoint you own. Treat their contents as untrusted input: validate the report shape, bound request size and rate, and allowlist the fields retained. Strip URL queries and fragments, cookies, user identifiers and script samples. Protect access to retained reports and set a retention period appropriate to the test.

Normalize a test report into a small application log before forwarding it. This is a synthetic normalized example, not a raw browser report or evidence from the Optimizely incident:

{
  "message": "csp-policy-test policy-check-20261117-a",
  "service_name": "browser-policy-reporter",
  "labels": {
    "test_id": "policy-check-20261117-a",
    "disposition": "report",
    "directive": "script-src-elem"
  }
}

Retain the browser’s reported directive and disposition when present; do not invent a value to match the example. Keep the test identifier under your own control rather than accepting arbitrary labels from public submissions.

Your reporting service can send the normalized object server-side to a Fluxtail HTTP JSON receiver. Use the active receiver’s exact URL and its receiver-bound Bearer token with ingest:write. Keep that token in server-side secret storage, outside browser code. Do not point browser reporting headers directly at the receiver or forward arbitrary report bodies unchanged.

HTTP 202 means the receiver accepted the submission. Next, select the receiver’s stream and test time window in Live Tail, search for policy-check-20261117-a, and inspect the stored row. Check its message, service and labels against the sanitized record. The single-event ingestion guide covers this acceptance-to-readable-row check.

A visible row establishes that the normalized event reached readable log storage. Its disposition describes the reported policy mode. It does not prove data theft, successful exploitation or the absence of earlier exposure. If the row is missing, check collection, forwarding, retention and active search filters before drawing a conclusion about browser behavior.

Keep policy verification separate from visitor impact

For the incident assessment, preserve the project, script version and observation time behind each finding. For policy verification, preserve the harmless test’s headers, browser behavior and reporting result. Keep those records separate so a successful test today is not mistaken for evidence about yesterday’s visitors.

The public evidence confirms unauthorized code injection and documents malicious snippet contents. The remaining work for each affected site is to establish which pages and visitors could have received those contents, what browser evidence survives, and which consequences can actually be demonstrated.