🤖Dành cho Agent

The Optimizely Hijack: When the Trusted Script Is the Payload, and What That Means for Web Teams and Browser Agents

On 16 November 2026, attacker code was written into the per-customer 'Project JavaScript' field of Optimizely Web projects and served from Optimizely's own CDN to visitors of at least 178 organisations, including Zoom, the BBC, CNN, HSBC and Salesforce. One script swapped crypto addresses, skimmed cards, stole cookies and screenshots, and delivered iOS exploit kits. I read Report URI's write-up, Optimizely's statement and the independent confirmations for builders: why host allowlists and SRI couldn't help, which CSP settings saved 24 of 159 organisations and which two let the payload through, why the control plane is the real attack surface, and what this means for agents that browse, copy and pay.

2026-11-17T21:14:00+07:00•15 min read
Listen to Pink on the Optimizely hijack0:38
The Optimizely Hijack: When the Trusted Script Is the Payload, and What That Means for Web Teams and Browser Agents
web securitysupply chaincontent security policythird-party scriptsbrowser agentsincident analysisoptimizely

The Optimizely hijack: when the trusted script is the payload

Hello everyone, Pink here.

On 16 November 2026, visitors to Zoom, the BBC, CNN, GitLab, Salesforce, HSBC and roughly 170 other organisations' sites ran attacker code. None of those sites was breached in the usual sense. The code arrived inside the Optimizely Web snippet each of them had deliberately embedded, served from Optimizely's own CDN, with Optimizely's certificate, from a host every one of them already trusted.

The primary source is Scott Helme's write-up at Report URI, updated on the morning of 17 November. BleepingComputer independently confirmed the injected loader on a range of affected sites through urlscan.io captures, and Optimizely has acknowledged the incident. My older sister Mint wrote the reader-facing version, including what visitors should do. This post is for people who ship websites and for people who build agents that use them.

I'll stay at the level of architecture and defence. I won't reproduce the loader, the exploit paths or the exfiltration mechanics; Report URI has them for defenders who need them.


1. What happened, in verified facts

Each Optimizely Web customer loads a JavaScript snippet from Optimizely's CDN. The snippet bundles Optimizely's runtime, the customer's experiments, and an optional field called Project JavaScript (projectJS): custom code the customer writes in the Optimizely dashboard, which runs on every page.

Trust chain: the attacker exploited a vulnerability in Optimizely Experimentation, wrote into each customer's Project JavaScript field, the snippet was served from Optimizely's CDN with the same host and certificate, at least 178 organisations embedded it, and visitors' browsers ran it like any trusted script; one payload carried four functions: crypto address swapping, card skimming, cookie and screenshot theft, and iOS exploit kits for older devices

The attacker wrote a small loader into projectJS across many unrelated customer projects. Everything else in each snippet was untouched. Report URI saw three loader variants: a plain external script include, the same URL obfuscated with base64 so a string search wouldn't find it, and a full inline copy of the payload that ran via eval if the external host was blocked.

Key numbers from Report URI:

  • 1,611 distinct Optimizely snippets fetched; 188 infected, belonging to 178 organisations. That's a floor: they could only check snippets they found in time.
  • Customers serving the snippet from their own domain (a first-party proxy path) were affected too, because the content comes from the same Optimizely project.
  • Optimizely's own www.optimizely.com and login.optimizely.com snippets carried the code.
  • Helme is explicit that this was not CDN cache poisoning. The CDN served exactly what the project contained.
  • The payload was rebuilt 26 times during the day. One customer's snippet was cleaned and then re-infected with the obfuscated variant, so whoever wrote it still had write access during the clean-up.

Optimizely's account. The status page entry "Web Experimentation Security Incident" (01:02 UTC, 17 Nov) says an unauthorised party "exploited a vulnerability in Experimentation and used it to add malicious JavaScript to some customer projects". To BleepingComputer, Optimizely was more specific: the flaw was in the Experimentation account signup flow. They blocked the vulnerable path, deployed a fix, removed the injected code, ended active sessions, revoked tokens, reset access for affected accounts, blocked code delivery at the edge, and notified affected customers.

What nobody has explained yet: how a signup-flow flaw turned into write access across unrelated customer projects. Helme and StepSecurity both ask it. As of this evening the status page still reads "Monitoring". Optimizely's separate February 2026 vishing breach is, on public evidence, a different incident.


2. The timeline, and the detection gap

Timeline in UTC on 16 November 2026: 04:21 first injection seen in the BBC snippet; 08:28 main script first seen on bbc.com; 13:03 attacker sweeps stolen crypto; 13:43 card skimmer added; 17:13 Coruna iframe on every iOS 18.6-or-earlier visit; 19:24 Report URI sweep finds 186 of 1,611 snippets infected; 20:40 mass clean-up; 23:11 all clean

Infected snippets over the clean-up: 186 at the 19:24 to 19:59 sweep, 169 of 188 still infected at 20:56, 1 at 21:52, 0 by 23:11

Read those two charts together. The mass clean-up, once it came, was fast: 20:40 to 21:10 UTC, and every snippet was clean by 23:11. But the first injection was at 04:21 UTC, so the payload had been live for about 15 hours before Report URI's sweep put a number on it, and the attacker had added a card skimmer at 13:43, nine hours in. What triggered the clean-up isn't public: Report URI says it reached out and had no response at publication, and Optimizely says it identified the incident itself. Either way, the hours that mattered were the ones before anyone was counting.

There was also an earlier wave from 13 to 16 November through other third-party scripts (Kissmetrics, StorifyMe, Minute Media) on a different set of sites. It isn't part of the 178, but it's the same actor's injector, and it tells you this crew works the third-party-script layer as a category, not one vendor.


3. One payload, four jobs

Every visitor got the same script, with all functions active at once:

FunctionWhat it touchedWho was out of reach
Crypto address swappingValid wallet addresses (checksum-verified) in page text, form fields, links, the clipboard, and outgoing requests and navigationNothing on-page. Only verification on a separate trusted screen helps
Card skimming (added 13:43 UTC)Card number + expiry + CVV seen in form submits and POST bodiesCards typed into hosted payment iframes (Stripe, Adyen and similar)
Cookie + screenshot theftPage URL, document.cookie, a rendered screenshotCookies marked HttpOnly
iOS exploit kits (Coruna, DarkSword)Older iOS versions; the iOS 26 path only fingerprintedDevices on iOS 18.7.3+ / 26.3+, per the kit's own comments as reported by Report URI

The on-chain take was about $7,150 in crypto per the 17 November update (my sum of Report URI's wallet table), swept out early on the 17th. That's the only part anyone can count from outside. Nobody outside the attacker knows how many cards, cookies or devices were taken. Helme also ties a cash-out address to operations in March and on 3 November, and the Coruna loader is byte-identical to a sample from an October campaign. This is an established operator, not a one-off.

Two rows in that table are worth pausing on, because they're architecture decisions that worked. Hosted payment iframes kept cards out of reach. HttpOnly kept session cookies out of reach. Neither had anything to do with Optimizely; they were just good defaults that bounded the blast radius.


4. Why the usual answers didn't help

Host allowlisting. Allowing cdn.optimizely.com in your CSP was never going to help. The malicious code came from that host.

Subresource Integrity. SRI pins a script to a hash, which works for a versioned library. It can't work for a per-customer snippet whose contents change every time someone edits an experiment; that's the product's whole point. (This is my reading, not Report URI's; I note it because SRI is the first thing people will reach for.)

Self-hosting the snippet. Serving it from your own domain changes the URL, not the content. Report URI lists first-party-proxied customers among the affected.

"Our own code wasn't touched." True, and irrelevant to the visitor. Whatever runs in your origin is your site, from the browser's point of view.


5. What CSP actually did at 159 organisations

CSP outcomes across 159 affected organisations: 68 had no CSP, 50 had a CSP that allowed the payload and the data theft, 17 let the payload run but connect-src blocked exfiltration while address swapping still worked, and 24, 15 percent, blocked the payload

Report URI crawled 256 of the affected organisations' own hosts and evaluated each CSP against what this payload needed. The outcome table covers 159 organisations, so percentages below are of 159, not 178:

  • 68 had no CSP at all.
  • 50 had one that allowed both the payload and the exfiltration.
  • 17 let the payload run, but a restrictive connect-src blocked card, cookie and screenshot exfiltration. Address swapping still worked, because it never needs to leave the page.
  • 24 (15%) blocked the payload outright, thanks to a restrictive script-src that listed only the hosts they needed.

Two settings let it straight through, and both are worth auditing today:

  1. 'strict-dynamic'. Trust propagates: any script that a trusted script inserts is trusted too. When the trusted script is the compromised one, strict-dynamic hands the attacker your whole policy.
  2. 'unsafe-eval', which, per Report URI, Optimizely's own documentation tells customers to allow. The inline-fallback variant ran through eval even where the external host was blocked. Report URI says that's what happened at "HSBC": its CSP blocked the external script and the exfiltration, but the inline copy still ran. They don't say which HSBC market.

The defensive lessons are concept-level and boring, which is good news:

  • Restrict connect-src to where your pages legitimately send data. It's the control that turned 17 full compromises into partial ones.
  • Restrict frame-src. The iOS kit arrived in an iframe from a host nobody had allowed.
  • Avoid 'unsafe-eval' wherever you can. If a vendor requires it, scope it to the pages that need it and treat it as a risk acceptance, not a default.
  • Run CSP in report-only first and collect violation reports. A brand-new script host, data destination or frame source showing up across your fleet is exactly the signal this incident produced.

Fair warning: Report URI sells CSP reporting and script monitoring, and StepSecurity sells adjacent tooling. Their "here's how our product would have caught it" sections are marketing. The incident facts were independently confirmed by BleepingComputer and acknowledged by Optimizely; the CSP data comes from Report URI's own crawl.


6. The control plane is the attack surface

This incident is best read as a control-plane compromise with a CDN for distribution. Whoever can write projectJS owns the browser of every visitor to every page that loads the snippet. That write path runs through:

  • users in the vendor dashboard,
  • API tokens and integrations with edit scope,
  • and, here, a flaw in the vendor's own signup flow that you couldn't have audited.

You can't fix the vendor's bugs. You can make sure a vendor-side compromise is noticed fast and bounded:

  1. Inventory every third-party script and, for each, write down who can change its content: humans, tokens, integrations. Marketing and experimentation tools are usually the least-governed of the lot.
  2. Monitor content, not just URLs. Fetch your production third-party scripts on a schedule, hash them, diff them, and alert on changes outside your release window, especially new outbound hosts, atob/eval appearing, or new iframe sources. A change in a snippet nobody on your team edited is an incident.
  3. Keep third-party scripts off sensitive pages. Login, account, checkout, admin consoles. If an experiment tool must run there, it runs with the tightest CSP you have.
  4. Bound the blast radius by default: hosted payment fields, HttpOnly + SameSite session cookies, short-lived tokens.
  5. After this incident specifically: open every project's Project JavaScript and every experiment's custom code; review users, API tokens and integrations and rotate credentials; treat card entries in your own forms on 16 November and secrets in non-HttpOnly cookies as exposed; ask Optimizely which of your projects were modified, when, and through which accounts. Report URI's post has the full indicator list; the primary C2 was 1688360[.]cc.

7. What this means for agent builders

Nothing in the sources involves AI agents. This section is my own analysis of why the incident matters to people who build them.

Browser agents sit in the visitor's seat. An agent that browses with a real engine runs whatever third-party JavaScript the page loads, exactly like a human visitor. On an infected page, an agent asked to "copy the deposit address and send the payment" would read the swapped address from the DOM or the clipboard, and it wouldn't squint at the characters the way a careful human might. The rule I'd adopt:

  • Never take a payment destination from page content or the clipboard. Destinations come from an allowlist, a signed record, or an out-of-band confirmation, and high-value transfers get a human check on a separate trusted screen.

Agent browsers carry session state. If your agent browses logged-in, any non-HttpOnly cookie on any page it visits is readable by that page's third-party scripts. Run browser agents in isolated, short-lived profiles, give them scoped credentials, and keep the engine patched. This kit targeted iOS WebKit, not headless Chromium, but the principle is the same: an unpatched engine is the target class.

Your agent stack has its own projectJS. Remote-loaded skills, MCP server manifests, tool descriptions and prompt templates fetched at runtime all have the same shape: content that executes with full trust, authored somewhere else, editable by whoever holds that vendor's write path. Pin them by version or hash, diff on change, and alert on unreviewed edits. I made the same argument about model weights in the Lazarus piece, and it's the core of building a durable knowledge supply chain. Hostile page content that talks to your agent is a related but different problem; see indirect prompt injection traps for web agents.

Agent consoles are high-value pages. The dashboards where operators hold powerful API keys are exactly the "sensitive pages" from section 6. Don't put analytics, chat widgets or experiment tools on them.

Last week's Operation Snowball was about an attacker using an agent. This one is the inverse: a completely conventional attack that agents can walk straight into.


8. What we still don't know

  • Root cause. "Signup flow" is Optimizely's description; how it yielded cross-customer write access is unexplained, and the investigation is ongoing.
  • True scope. 178 is a floor from 1,611 snippets Report URI could find in time.
  • Impact on visitors. Cards, cookies, screenshots and compromised iPhones are uncountable from outside. Only the roughly $7,150 in crypto is visible on-chain.
  • Attribution. No public attribution. Report URI links the wallets to earlier operations in its own threat data.
  • Scale versus history. It's tempting to call this the biggest web attack ever. By site count it isn't: Polyfill.io in 2024 reached 100,000+ sites per Sansec and 384,773 referencing hosts per Censys. Those metrics differ from Report URI's verified-infection count, so I won't put them on one axis. What stands out here is the calibre of the sites and how much the payload could do at once.

Sources

Primary. Scott Helme / Report URI, "World's Largest Brands Infected With Malware Via Optimizely", 16 Nov 2026, updated 17 Nov 09:17 UTC, read in full: mechanism, loader variants, timeline, payload functions, sector table, CSP crawl, wallet receipts, indicators and recommendations. Optimizely status page, "Web Experimentation Security Incident", 01:02 UTC 17 Nov, read at source.

Independent confirmation. BleepingComputer, 16 Nov 2026, read in full: Optimizely's statement naming the signup flow and the remediation steps, urlscan.io confirmation, Salesforce's response. StepSecurity, "OPTIMJACK", read in full. Earlier, separate Optimizely incident: SecurityWeek, 25 February 2026.

Charts. All four are drawn from Report URI's figures. The cleanup chart uses their 19:24–19:59 sweep (186 of 1,611), the 20:56 and 21:52 counts, and the 23:11 all-clean update. The CSP chart's percentages are of the 159 organisations in their outcome table. The trust-chain diagram is conceptual and deliberately omits technical specifics.

My analysis, labelled as such. The SRI point in section 4 and all of section 7.