Optimizely hack postmortem: lessons for third-party script security

Nearly three weeks after the November 16 attack on Optimizely Web Experimentation, the immediate containment work is finished and the public record is clear enough to examine what failed. Optimizely closed its status page incident on November 27 while Mandiant continued forensic work, the National Vulnerability Database cataloged the flaw as CVE-2026-132224, and CISA added it to its Known Exploited Vulnerabilities Catalog. What remains is a concrete case study for every engineering team that embeds third-party JavaScript on production pages.

On November 16, Scott Helme’s Report URI team surveyed 1,611 Optimizely snippets and found malicious code in 188 of them across 178 organizations, including the BBC, Zoom, GitLab, and HSBC. Those numbers measure compromised snippets and organizations, not a count of infected visitors.

In its November 17 customer incident report, Optimizely traced the intrusion to an account signup flaw that allowed the attacker to impersonate customer administrators and modify Project JavaScript. The company said no customer passwords were stolen and no Optimizely administrator account was compromised. The malicious changes reached visitors’ browsers through the Web Experimentation integration already installed on customer websites.

A company can lock down its source repository, review every deployment, and still expose visitors through an external service authorized to modify the page. Optimizely gives customers a way to change site behavior without shipping native application code, as its custom code documentation explains. The attacker gained that same publishing power.

How a legacy trial signup became a publishing credential

Optimizely’s November 25 incident update placed the vulnerability in a legacy free-trial signup flow that has since been shut down. The attacker registered trial accounts, located real customer email addresses using brute force informed by publicly available information, and abused a legacy impersonation feature, which Optimizely has since removed.

NVD published CVE-2026-132224 on November 18, classifying the flaw under CWE-642 (External Control of Critical State Data) and tagging it as an exclusively hosted service vulnerability. NVD scored it 8.7 (High) under CVSS v3.1, alongside MITRE’s CVSS v4.0 score of 7.1 (High). On November 24, CISA added the entry to its Known Exploited Vulnerabilities Catalog with a November 27 due date under Binding Operational Directive 26-04, directing federal agencies to apply vendor mitigations and perform forensic triage.

Optimizely’s public account does not provide enough detail to reconstruct the exact failed identity check, and inventing one would be speculation. It does establish the boundary failure that mattered: a trial account created by an outsider acquired another customer’s authority. A strong password on the legitimate account could not repair that flaw. The service had to reject the impersonation before accepting any change performed under it.

Project JavaScript explains why that access carried so much weight. Optimizely’s Project JavaScript documentation distinguishes code attached to an individual variation, code shared across an experiment, and code attached to an entire project. Project JavaScript executes at the beginning of the snippet, applies across all experiments in the project, and can define variables and functions on the page’s global Window object.

Delivery is dynamic by design. Optimizely’s snippet activation order documentation notes that the snippet updates whenever customers change compiled assets or settings, and that Project JavaScript runs before the targeting and audience-allocation steps that decide which variation a visitor receives. Narrowing an experiment’s audience does not limit the reach of code installed at the project level.

Helme found the injected loader inside that customer-controlled section of scripts served by cdn.optimizely.com. No affected organization had to approve a pull request or install a new dependency. The existing integration provided the distribution path.

An experimentation platform is a production deployment channel with a different user interface. Calling its output an experiment does not reduce the privileges of JavaScript once a browser executes it. For a security review, the practical questions are who can publish through that channel, including via signup, recovery, and support flows, and which pages load the result.

Archived projects could still reach visitors

Optimizely’s November 25 update also disclosed that the attacker reopened archived projects whose snippets remained on customer pages. That detail concerns former users as much as active experimentation teams. Optimizely’s project management documentation describes reversible archiving and unarchiving and states that Web Experimentation projects cannot be deleted. Archiving changes a project’s state inside the service. Removing a script tag from a website changes what visitors’ browsers actually request. Those are separate operations with different outcomes.

A team can treat an old experiment as finished because nobody opens its dashboard anymore. If the script tag stays in the site template, browsers keep fetching it. As long as that tag survives in production HTML, the security of the remote project stays tied to the site.

Keeping historical experiment records for analysis makes sense. Leaving their delivery tag wired into a live checkout or login page requires a separate justification. A vendor inventory compiled only from active contracts or current marketing campaigns will miss retired scripts that browsers still download.

Fixing the flaw and cleaning every snippet took different windows

Optimizely’s public updates, NVD, and CISA lay out how containment unfolded across November:

Date and time (UTC)Event
November 16, 03:54Early attacker testing in production begins
November 16, 07:51Main attack wave starts
November 16, 13:34First customer report reaches Optimizely
November 16, 16:10Account signup flaw patched
November 16, 22:24Malicious code removed from all affected projects
November 17, 00:01Direct customer notices begin; initial incident report issued November 17
November 18NVD publishes CVE-2026-132224
November 19Optimizely updates security advisory (under 5% of customers impacted) and revises IOCs
November 24CISA adds CVE-2026-132224 to the KEV Catalog (remediation due November 27)
November 25Optimizely publishes detailed incident update and confirms engaging Mandiant
November 27, 14:45Status page incident closed as resolved while forensic investigation continues

On Optimizely’s November 25 timetable, almost six hours separated the main attack at 07:51 UTC from the first customer report at 13:34 UTC. Another six hours and fourteen minutes passed between patching the signup vulnerability at 16:10 UTC and removing the malicious code from every affected project at 22:24 UTC, two milestones that also appeared in the November 17 customer report.

Those intervals answer separate questions. Closing an account flaw blocks the entry route, while previously published code still has to be located, stripped, and redeployed across CDN assets, and affected teams still need updated indicators to check their logs. Turning the entire day into one exposure window for every organization would distort the timeline: each project’s window started with its unauthorized edit and ended with its cleanup. Equally, a vendor patching a signup bug at 16:10 UTC does not mean every customer snippet went clean at that minute.

Scope numbers also need care. Optimizely’s November 19 security advisory put the impact below 5% of its customers and confirmed the incident stayed within Web Experimentation. That percentage divides by Optimizely’s customer base, whereas Report URI checked 1,611 public snippets and flagged 188 across 178 organizations. Neither figure counts how many individual visitors executed the malicious code.

Operational recovery also finished ahead of forensic conclusions. In its November 25 update, Optimizely said it had engaged Mandiant, part of Google Cloud, to support its security response, with Mandiant’s final report expected in a few weeks. When the status page closed the incident on November 27, it explicitly stated that the investigation was continuing. No newer public update arrived before December. Closing a live outage is not the same thing as finishing the record of what the code did while active.

What the script could and could not reach

Report URI documented cryptocurrency wallet address substitution, payment card skimming, collection of readable cookies and screenshots, and delivery of iOS exploit kits. Each capability depends on different browser boundaries. Grouping them into one blanket outcome hides both the real damage the script could cause and the isolation controls that held.

For payment cards, where the inputs live determines what a script can inspect. Optimizely’s November 17 report noted that the skimmer targeted card numbers, expiration dates, and security codes in standard page forms and outgoing requests, while hosted payment iframes stayed out of reach.

A cross-origin payment iframe is a separate document governed by the browser’s same-origin policy. JavaScript running in the parent merchant page normally cannot read inputs inside that frame. Ordinary form fields rendered directly in the merchant document belong to the same origin, so any script allowed onto the page can access them. MDN documents both those cross-origin document restrictions and how pages grant execution rights to embedded external scripts.

The boundary comes from origin separation, not visual styling. Drawing a container around inputs offers no isolation, and serving an iframe from the merchant’s own origin does not create a cross-origin barrier. Even when a properly hosted third-party iframe protects raw card numbers, compromised code on the surrounding page can still modify instructions, links, or totals displayed around it.

Cookies require similar precision. As MDN’s Set-Cookie reference explains, the HttpOnly attribute prevents JavaScript from reading a cookie’s value directly. It does not stop the browser from attaching that cookie to eligible requests initiated by JavaScript, including fetch calls. A session cookie can resist direct theft while hostile code still acts inside a signed-in user’s session. Whether a given request succeeds depends on the application’s other checks, so HttpOnly alone cannot prove a session remained safe.

Financial evidence carries its own boundaries. Helme observed incoming transactions to attacker-controlled cryptocurrency wallets and noted that one wallet predated this campaign. That shows funds reached the attacker’s infrastructure, not that every sender came from an Optimizely customer site. Optimizely reported no confirmed customer card or crypto losses as of November 25 while acknowledging it cannot count accessed cards, wallets, or cookies. There is no contradiction between visible wallet transfers and incomplete visitor-level telemetry: the missing piece is the direct link between a specific compromised page load, a specific visitor, and a specific transfer.

Delivering an iPhone exploit is not proof it worked

Report URI identified two iOS exploit frameworks in the delivery chain: Coruna and DarkSword. Earlier in 2026, Google Threat Intelligence published analyses of both. Its March 3 Coruna research documented five exploit chains and 23 exploits targeting the iOS versions covered by that study. Its March 18 DarkSword analysis described a chain using six vulnerabilities to compromise devices and deploy follow-on malware. Those reports cover earlier campaigns; they establish what the exploit kits are built to do, not the outcome of the Optimizely incident.

The distinction is practical. Loading JavaScript that checks a device’s software version and picks an exploit is stage one. Triggering the vulnerability, escaping the browser sandbox, and gaining persistent device access require the matching target version and full chain to succeed. Evidence of stage one alone cannot establish that the later stages completed.

As of November 25, Optimizely had received no reports of infected devices and said it had found no evidence of software installation outside the iOS and iPadOS effects still under investigation. That states what Optimizely’s evidence showed, not independent proof that every visitor escaped compromise. The accurate description is attempted exploitation with an unconfirmed count of compromised devices.

This also clarifies what operating system and browser patching can and cannot cover. Updating iOS and browsers blocks the mobile exploit chains, not ordinary page tampering or form scraping. Those browser-level attacks rely on capabilities the page already granted to the script.

A trusted CDN does not make every script trustworthy

Browser security headers can limit the damage from a compromised third-party snippet, though each control narrows a specific step rather than solving the whole problem:

Browser controlWhat it can stopWhat it missesMain operational tradeoff
CSP script-src host allowlistLoading a second-stage script (such as an external track.js file) from an unlisted domainMalicious code injected directly into an allowed cdn.optimizely.com snippetWeakened if strict-dynamic propagates trust or policy runs in report-only mode
CSP connect-srcOutbound theft via fetch, XMLHttpRequest, and sendBeacon to unapproved serversOn-page DOM edits such as swapping a displayed crypto wallet addressRequires maintaining an accurate allowlist of legitimate telemetry and API hosts
Subresource Integrity (SRI)Running any script whose downloaded bytes do not match the expected hashMalicious changes approved into your own release processMutable A/B snippets change frequently, requiring manual or gated hash updates
Cross-origin payment iframeParent-page JavaScript reading card numbers, expiration dates, and security codesTampering with instructions, links, or totals shown outside the frameDepends on true cross-origin separation rather than same-origin frames

Content Security Policy helps, but “we allow Optimizely” is an inadequate defense. A policy that permits scripts by hostname checks where a file comes from, not whether its current contents are safe. In its November 25 post, Optimizely explicitly noted that allowing cdn.optimizely.com alone did not help because the malicious loader shipped from Optimizely’s own CDN. An unauthorized edit inside an allowed script inherits that host’s permission, as MDN’s Content Security Policy guide explains.

A real boundary can still hold at the next hop. When the injected loader tries to fetch a second-stage payload, such as the attacker’s track.js script, from an unapproved host, an enforced script-src policy can block that request. Policy details decide whether that happens. MDN documents that strict-dynamic can propagate trust from a nonce- or hash-authorized script to scripts it dynamically creates. Report-only policies record violations without blocking execution. Seeing a CSP header on a response is not enough to know what the browser actually blocked.

Outbound collection is a separate layer. The connect-src directive restricts destinations for interfaces including fetch, XMLHttpRequest, and sendBeacon. Blocking an attacker’s collection server can stop skimming or cookie theft even after injected code runs. It cannot reverse a wallet address already replaced in the page, since a visitor can still authorize a transfer to that substituted address through a legitimate payment service.

Subresource Integrity offers a different check: the browser compares a downloaded script against an expected cryptographic hash and rejects any mismatch. Applying SRI to a changing experimentation snippet creates an operational tradeoff, because every legitimate edit alters the bytes too. Teams need a controlled review step to approve new code and update the pinned hash; automatically signing off on whatever arrives from the vendor CDN surrenders the protection.

These controls work because each restricts a different action. None replaces vendor access checks, and once an unauthorized script runs in a visitor’s browser, an account-level fix at the vendor cannot tell a customer what that script already did inside the browser.

Experiment publishing deserves production scrutiny

Optimizely’s November 25 update outlined several planned changes: custom-code approval requirements, native change alerts, multifactor authentication across internal systems, impersonation testing across the platform, and scheduled rotation of machine credentials. Approval gates and change alerts directly address the gap between obtaining account access and modifying what visitors execute. Their usefulness depends on implementation, including whether approvals stay independent if another impersonation flaw occurs.

Site operators do not need to wait for Mandiant’s final report to tighten their own boundary. Audit production HTML for stale experimentation tags belonging to archived or retired projects and strip unused scripts rather than relying on vendor-side archiving. Keep raw payment fields inside cross-origin hosted iframes, and ask whether A/B testing tags belong on login, checkout, or wallet pages at all. Inspect enforced CSP rules across script-src and connect-src, verify whether strict-dynamic widens script trust, and confirm policies run in enforcing mode rather than report-only mode. Give every dashboard capable of shipping JavaScript to visitors an accountable owner, change alerts, and a tested kill switch.

The striking part of CVE-2026-132224 is how much of the web stack worked as designed after one legacy identity check failed. Project JavaScript compiled into snippets, customer pages fetched them from cdn.optimizely.com, and browsers executed the code with full page permissions. Organizations made the trust decision when they installed those integrations. The security work lasts for as long as the tags remain on the page.

Sources

Optimizely advisories and documentation

Optimizely: Initial customer incident report, November 17, 2026 (PDF)
Optimizely: Security advisory updated November 19, 2026
Optimizely: Web Experimentation security incident update, November 25, 2026
Optimizely Service Status: Web Experimentation security incident closed November 27, 2026
Optimizely documentation: When to use custom code, shared code, Project JavaScript, and extensions
Optimizely documentation: Snippet order of activation
Optimizely documentation: Manage projects (archiving and unarchiving)

Security research, CVE, and threat intelligence

Scott Helme, Report URI: World’s largest brands infected with malware via Optimizely, November 16, 2026
NVD: CVE-2026-132224 (Optimizely Web Experimentation account signup vulnerability)
CISA: Known Exploited Vulnerabilities Catalog (CVE-2026-132224 added November 24, 2026)
Google Threat Intelligence: Coruna iOS exploit kit research, March 3, 2026
Google Threat Intelligence: DarkSword iOS exploit chain research, March 18, 2026

Browser security specifications

MDN: Same-origin policy and cross-origin access
MDN: Set-Cookie and the HttpOnly attribute
MDN: Content Security Policy, strict-dynamic, and report-only enforcement
MDN: CSP connect-src directive
MDN: Subresource Integrity