Attackers are abusing Optimizely, the widely deployed experimentation and feature-flagging platform, to inject malicious JavaScript into customer sites. Because the tag is loaded from a trusted third-party origin and normally ships on every page view, the injected code inherits the full trust of the host site and runs before most defences can see it.
The campaign has now been confirmed on at least 178 organizations, including major media and SaaS properties. Investigators say the rogue snippet behaves differently depending on where it lands: on commerce pages it hooks form handlers to lift card data, on crypto-facing pages it rewrites destination addresses held in the clipboard and in DOM attributes, and on mobile traffic it appends a second stage aimed at iOS builds.
The iOS stage does not need a malicious app. It just needs a browser and a version range the payload recognises.
Three loader variants, one goal
Three distinct loader shapes have been recovered so far. Each is built to survive a different mitigation:
- Inline variant — the full payload is carried in the loader itself, so blocking the attacker domain does not stop it.
- Remote variant — a short stub fetches the real payload from an attacker-controlled host, letting operators swap behaviour per visitor.
- Delayed variant — waits for DOM readiness and user interaction before attaching, which defeats scanners that only parse the initial HTML.
Analysts note that blocking the attacker's domain, a common first reflex, does not stop every payload. The inline variant keeps working with the domain blackholed.
Cleanup alone was not enough
At Smartsheet, removing the malicious code from the Optimizely snippet did not keep the operator out. The snippet was re-infected with a hidden version of the same code shortly after cleanup, which points to the attacker still holding write access to the Optimizely project at that moment — not to a second, unrelated compromise.
That distinction matters for anyone doing incident response. Rotating the Optimizely project credentials and auditing every member, token and integration with write scope has to happen before the snippet is considered clean, otherwise the fix is reverted inside a day.
What site owners should inspect
The injected code is small and deliberately quiet. Review the following in each Optimizely snippet and in the rendered page:
- Any
createElement("script")or dynamic import that was not part of the original project. - Base64 blobs, eval-style decoding, or hex string concatenation ahead of a
srcassignment. - Form submit listeners that read card fields, plus clipboard write calls on checkout and wallet pages.
- Mobile-only branches keyed on user agent that load a second file.
Deployments that use Subresource Integrity on the Optimizely tag are not automatically safe: the tag itself is the trusted origin, so an SRI hash pinned to a moving third-party bundle usually only protects the first hop.
Advisory
Rotate Optimizely credentials and API tokens, audit project membership for accounts that should no longer have write access, and re-check the snippet from a second network and user agent after cleanup. Where possible, diff the current snippet against a known-good copy taken before the incident instead of reading it fresh — the hidden third variant is authored to look ordinary.
Status: active. Confirmed impact spans media, SaaS and commerce properties. Organizations that embed third-party experimentation or tag-manager scripts should assume exposure until their snippet has been diffed and their project access reviewed.