Skip to main content
NewDependency Trust 2026 Report68% of observed components were more than two years old.Get the report
CleanStart

Trusted Host, Wrong Code: What the Optimizely Attack Says About Third-Party Trust

6 min read
Contents

Most of the advice you will read this week says to lock down which domains can serve scripts on your site. But every affected site on 16 November already trusted the domain from which the malicious code was delivered.

The code arrived inside an Optimizely script, served from cdn.optimizely.com with Optimizely's own certificate. The file was one each site had deliberately chosen to load.

The attacker didn't need to compromise those websites or poison Optimizely's CDN. As Report URI explains, the CDN served exactly what it was given. The malicious code had been inserted into customer projects and delivered through each site's own Optimizely snippet.

That is the part worth understanding, because it applies to every third-party script vendor you use, not just this one.

What happened

Optimizely Web lets customers load JavaScript from its CDN, including their experiments and custom code that runs across their websites.

The attacker injected a malicious loader into this custom-code field across multiple customer projects.

Report URI examined 1,611 snippets and found 188 carrying the injected code, belonging to 178 organizations. The affected sites included Zoom, the BBC, CNN, Salesforce, GitLab, HSBC and Equifax.

The first injection appeared at 04:21 UTC. Most affected snippets were cleaned between roughly 20:40 and 21:10 UTC, making the incident window close to 17 hours.

Optimizely told Gizmodo that an unauthorized party exploited a vulnerability in its Experimentation account signup flow. The company said it had blocked the vulnerable path and deployed a fix.

The payload swapped cryptocurrency wallet addresses, skimmed card numbers entered into website forms, and captured non-HttpOnly cookies and page screenshots when it swapped an address. It also delivered iOS exploit chains targeting different versions, including Coruna (iOS 13 to 17) and DarkSword (iOS 18.x).

Report URI traced approximately $7,040 in cryptocurrency to the attacker's wallets by 19:25 UTC on 16 November.

Why the allowlist did not help

Content Security Policy (CSP) is the obvious answer, but the results show why an origin allowlist alone isn't enough.

Report URI crawled 256 hosts belonging to affected organizations and reports the result per organization:


CSP result

Organizations

No CSP at all

68

CSP allowed the payload and data theft

50

Payload ran, but connect-src blocked data theft

17

Payload blocked

24 (15%)

Allowing cdn.optimizely.com offered no protection because the malicious code arrived through that trusted host.

The 24 organizations that blocked the payload had restrictive script-src policies. Two settings weakened that protection.

strict-dynamic extends trust to scripts loaded by an already trusted script, allowing the Optimizely snippet to load the attacker's code.

unsafe-eval, which Optimizely's own documentation asks customers to allow, let an inline copy of the payload run through eval even where the external script was blocked. That is what happened at HSBC: its CSP blocked track.js and the data theft, but the inline copy still ran.

The 17 organizations with partial protection offer another lesson. Their connect-src policies blocked data exfiltration, but did not prevent cryptocurrency address swapping within the page itself.

A trusted origin establishes where code came from, not what it does.

Why Subresource Integrity is not the fix either

Subresource Integrity (SRI) pins a script to a cryptographic hash, rejecting changes to the file. It works well for static libraries that change only when a new version is released.

Experimentation snippets are different. They change whenever marketing teams update tests or custom JavaScript. Maintaining a stable hash becomes impractical without controlling every update.

The scripts most worth protecting are often the ones designed to change without a deployment on your side.

It was a campaign, not a one-off

Report URI links the same actor to an earlier wave between 13 and 16 November, through scripts served by Kissmetrics, StorifyMe and Minute Media on sites including securitybank.com, faz.net, smh.com.au, vidaxl and foxsports.com. StepSecurity has not independently verified that link.

Reviewing Optimizely alone may mean overlooking other third-party integrations exposed to the same kind of risk.

What to check now

If you use Optimizely Web:

  1. Review Project JavaScript across all projects and experiments. Look for 1688360.cc, atob( and code nobody on your team wrote.
  2. Review users, API tokens and integrations with write access. Remove unauthorized access and rotate credentials. Report URI documented a Smartsheet snippet that was cleaned and then reinfected with a Base64-encoded variant, indicating the attacker retained a way to modify the project.
  3. Treat card numbers entered into your own form fields and secrets in non-HttpOnly cookies on 16 November as potentially exposed.

For every third-party script:

  1. Inventory what actually executes in visitors' browsers, not just what your tag manager says should execute. StepSecurity found that a cookie consent manager on a GitLab page was responsible for loading the Optimizely snippet. A consent banner controls when a script runs, not what it contains.
  2. Restrict connect-src to required destinations. It can prevent data theft even when a malicious script executes.
  3. Use restrictive script-src policies. Remove unsafe-eval and strict-dynamic wherever vendors do not strictly require them, and enable CSP reporting.
  4. Monitor changes to third-party scripts. A script that was clean when approved may contain different code the next time it loads.
  5. Include vendor account security in your threat model. Here, the reported weakness was in the vendor's signup flow, beyond the reach of controls on customer websites.

The pattern underneath

None of the affected sites needed to have their own infrastructure breached. Each ran code it had never reviewed, fetched at runtime and trusted because of where it came from.

The same trust problem exists in your build pipeline. A FROM line referencing a mutable tag can pull a different image tomorrow. A dependency range can resolve to a different package version at the next installation.

Pinning artifacts by digest identifies the exact content being consumed. Verifying signatures and provenance provides evidence of who produced that artifact and how it was built.

Hardened container images and verified open-source packages would not have stopped the Optimizely attack. It happened in the browser, not on the server. But the underlying lesson applies across the software supply chain: trusting the source is not the same as verifying the code.

This is the problem CleanStart works on across container images and open-source dependencies.

What to do next

Start by auditing the third-party scripts running on your website. Compare what actually executes with what your team intended to approve.

Beyond the browser, CleanStart offers Clean Images, hardened container images built from source and backed by SBOMs, cryptographic signatures and verifiable provenance, and Clean Libraries, helping developers discover and evaluate open-source dependencies before adoption.

Both address the same fundamental requirement: knowing what enters your software supply chain and having evidence to verify it.

Sources

CleanStart Security

CleanStart Security

The CleanStart team brings you the latest news, insights, and quick takes from the world of cybersecurity and software supply chain security.

Related Blogs

See All
Http2shell everything we know so far
Supply Chain Attack
6 min read

HTTP2Shell: Everything We Know So Far

How a vulnerability in Google's Brotli decoder has expanded beyond Node.js to affect Python, .NET, Java and other widely used software.

Read more
Litellm attack
Supply Chain Attack
6 min read

LiteLLM 1.107.0 Compromise: What Happened, Who Is Affected, and How to Clean Up

LiteLLM 1.107.0 wheels on PyPI and Docker shipped a credential stealer on Oct 21, 2026. Check exposure, clean up in the right order, and rotate secrets.

Read more
Php2shell attack
Supply Chain Attack
4 min read

PHP2Shell: What You Need to Know About Two Critical PHP Vulnerabilities

PHP2Shell (CVE-2026-109618, CVE-2026-109619) enables unauthenticated RCE in PHP. See fixed versions for 8.2 to 8.5 and how to patch and verify your runtime.

Read more