Blog
A Trusted Script Got Hijacked and Hit 178 Organizations. Here's How I'd Protect a Small Business Site
Attackers slipped a card skimmer and a crypto-address swapper into scripts that big sites load from Optimizely. Here's what the researchers say happened, and what a small business can do: CSP, SRI and its limits, a script audit, and hosted payment fields.
Caleb Dorris 27 November 2026, 10:00 AM 11 min

The short version
If a vendor's script can run on your checkout page, the vendor's security is part of your security.
On November 16, attackers used a flaw in Optimizely to add malicious JavaScript to scripts that customers' sites load from it. Report URI, the security firm that found it, counted 188 infected scripts across 178 organizations, including CNN, the BBC, Zoom, GitLab and Salesforce. Optimizely says it has fixed the flaw and removed the code. The lesson for a small site isn't "drop every third-party tool." It's: know which scripts run, keep them off the pages that take payment, take cards in a hosted payment frame, and put a Content Security Policy (CSP) in front of all of it.
I'm writing this on a holiday-shopping weekend because it's the best real-world example I've seen of something I tell clients all the time. Your website is not just your code. Every analytics tag, chat widget, A/B testing script and ad pixel is someone else's code running with full access to your pages. When one of those vendors gets hit, you get hit, and nothing on your own server looks wrong.
What happened
Optimizely is a platform sites use to run A/B tests and personalize pages. Customers load a JavaScript file from Optimizely's servers, and it holds their experiments plus an optional field of their own custom code that runs on every page.
According to Report URI, a security firm run by researcher Scott Helme, the attacker wrote a few lines into that custom-code field in customers' Optimizely projects. Everything else in each file stayed the same. The files were still served from Optimizely's own address, with Optimizely's certificate, so every site that loaded one trusted it. The added code pulled in a second script that did three things, according to Report URI and BleepingComputer, which independently confirmed the loader on affected sites:
- It swapped cryptocurrency wallet addresses on the page for the attacker's.
- It looked for card numbers, expiry dates and security codes typed into forms and sent them to the attacker.
- On iPhones and iPads, it tried to load iOS exploit kits that Report URI identifies as Coruna and DarkSword.
Here is what the sources say, and what they don't:
- Scale. Report URI checked 1,611 Optimizely scripts and found 188 infected, belonging to 178 organizations. It says the real number is probably higher because it could only check scripts it had found in time.
- How it got in. Optimizely told BleepingComputer that an unauthorized party "exploited a vulnerability in the Experimentation account signup flow" and used it to add malicious JavaScript to some customer projects. Nobody outside Optimizely has explained how a signup flaw gave write access to other customers' projects.
- The fix. Optimizely's status page says it fixed the vulnerability, removed the injected code, secured affected accounts and added protections against unauthorized code delivery. When I looked on November 17, the incident was still marked as monitoring, with no later update. Report URI's November 17 update says it saw every infected Optimizely file clean as of 23:11 UTC on November 16, and that registrars had put the attacker's main payload domain (1688360.cc) and its earlier injector domain on hold.
- Salesforce. Salesforce told BleepingComputer that, as a precaution, it was confirming Optimizely scripts were disabled across its preview and production instances.
- Money. Report URI counted roughly $7,000 sent to the attacker's crypto wallets on November 16, and says the attacker emptied them early on November 17. Report URI says it can't see how many cards or cookies were collected.
- The iPhone part. The exploit kits were set up to load. Report URI describes the script loading an exploit chain based on the iOS version, and says it can't see how many devices were infected before the attack was stopped.
A copy of the file on your own domain didn't save you either. Report URI notes that some customers serve the Optimizely script from their own address, and those were affected too, because the content comes from the same project.
Why a trusted script is the dangerous kind
Most small-business security advice is about keeping bad code out. This attack came in as good code. The browser had no reason to be suspicious, because the script came from the vendor the site had approved.
That matters for the usual defenses:
- Adding Optimizely's address to your allowed list doesn't help, because the malicious code arrived from that address. Report URI says exactly this.
- Scanning your own server finds nothing. The change happened in the vendor's system.
- Your own code review wouldn't have caught it, because it was never in your repo.
What would have helped, and what wouldn't
A Content Security Policy that actually restricts things
A CSP is a response header that tells the browser which sources a page may load scripts from, and where it may send data. Report URI crawled 256 of the affected organizations' own sites to see whether their policies would have stopped this payload. In the results it published, 159 organizations were classified:
- 68 had no CSP at all.
- 50 had one that let both the payload and the data theft through.
- 17 let the code run but blocked the data from leaving, though address swapping still worked, because that happens inside the page.
- 24 (15%) blocked the payload.
Report URI says what separated those 24 was a restrictive script-src that lists only the hosts the site needs. It also named two common settings that let the attack through. One is 'strict-dynamic', which trusts anything a trusted script inserts. The other is 'unsafe-eval', which let the backup copy of the payload run on at least one major site. Optimizely's own documentation says some features, including audiences with custom JavaScript conditions, don't work without 'unsafe-eval', and its example policy uses 'strict-dynamic'. I'd read that as a trade-off to make on purpose, not a default.
My take for a small site: start in report-only mode so nothing breaks, read the reports for a couple of weeks, list the hosts you actually use, and lock down connect-src so a rogue script has nowhere to send stolen data. A CSP won't stop a vendor you approved from misbehaving on its own host. It limits what that script can load and where it can talk, and that was the difference for the 24.
Subresource Integrity (SRI), and why it isn't the whole answer
SRI lets you put a hash on a script tag. The browser downloads the file, compares its hash to yours, and refuses to run it if it doesn't match. MDN describes it as protection against exactly this kind of supply-chain attack, and for a script that never changes, like a pinned version of a library from a CDN, it's a good idea.
It has real limits here:
- It only works if the file is supposed to stay identical. The Optimizely script changes whenever the customer edits a project, according to The Hacker News, so a pinned hash would break your tests every time you changed one. You'd have to update the hash on every edit, and then someone has to check the new file.
- It only covers script tags you write. When a trusted script creates another script tag itself, which is what the injected loader did, you never get to put a hash on that one.
- A hash tells you the file changed. It doesn't tell you whether the change was legitimate.
So use SRI for static, versioned files, and don't expect it to protect a vendor tag that's designed to change.
A script audit you actually do
This is the unglamorous one, and it has the best return. Open your site in a browser, open the Network tab, filter to scripts, and look at what loads on your home page, your product pages and especially your checkout. For each one, ask:
- Who put it there, and is it still used?
- Which vendor account can change what it does? Is that account behind multi-factor sign-in, and does it have only the people who need it?
- Does it need to be on the checkout page at all?
On the A/B testing side specifically, I'd check who can edit custom code in the tool, and review that code on a schedule. Report URI's list of checks for Optimizely customers starts with exactly that.
Hosted payment fields, so card numbers never touch your page
This is the one part of the story where something worked. Report URI and The Hacker News both say the skimmer could not read cards typed into a payment provider's hosted frame, like Stripe's or Adyen's, because that frame is a separate page from another origin. The risk was highest where a site collected card numbers in its own form fields.
If you take cards, use your processor's hosted fields or hosted checkout page rather than building your own card form. It's usually less work and it takes your site out of the blast radius. Also, keep marketing and testing tags off the payment page, which is StepSecurity's advice as relayed by The Hacker News.
If you use Optimizely
If your site loads an Optimizely Web script, here's what Report URI recommends, along with what I'd add:
- Open the custom code in every project and experiment. Look for
1688360,atob(and any script you didn't write. Theatob(search finds the version that hid the address. - Review which users, API tokens and integrations can write to your account, and rotate their credentials.
- If your own forms take card numbers, treat cards entered on November 16 as possibly exposed, and talk to your payment processor.
- Treat any session tokens kept in cookies without the HttpOnly flag as exposed and rotate them. The malicious script could not read HttpOnly cookies.
- Ask Optimizely which of your projects were changed, and when.
- Consider telling your customers if your site served the code.
If you visited one of the affected sites on November 16, Report URI advises updating iPhones and iPads to iOS 18.7.3 or later, or iOS 26.3 or later, checking any crypto payment you made that day against the address you meant to pay, and watching card statements.
A short checklist for your own site
- List every third-party script on your home, product and checkout pages.
- Remove anything you don't use or can't name an owner for.
- Keep marketing, testing and chat tags off the payment page.
- Take cards in a hosted payment frame, not your own fields.
- Add a CSP in report-only mode, read the reports, then enforce it with a tight
script-srcandconnect-src. - Use SRI on static, versioned files.
- Turn on multi-factor sign-in for every vendor account that can change code on your site.
- Set HttpOnly and Secure on your session cookies.
- Have a plan for the day a vendor tells you they were hit. My API key rotation runbook is a good start, and if a WordPress site is involved, my audit checklist covers what to look at.
Need help with this?
If this made you wonder what's running on your own checkout page, I can find out and fix it. I audit the third-party scripts on WordPress, WooCommerce and Next.js sites, set up a Content Security Policy in report-only mode and tighten it from the reports, move card entry to hosted payment fields, and lock down the vendor accounts that can change your pages. If you'd rather start with the wider picture, here's my plain-English WordPress security guide for Nashville businesses.
I work with businesses in Nashville and Davidson County, Franklin, Brentwood and the surrounding area, and remotely too. Email caleb@calebdorris.com, call or text (615) 914-1073, or send me the details. The intro call is free, and you can see how I work with Nashville businesses.
FAQ
Does this mean I should stop using third-party scripts?
No. Analytics, chat and testing tools are useful. The point is to know what's running, keep it off pages that take payment, and limit what each script can do.
Would a CSP have fully stopped this attack?
Not by itself. Of the 159 organizations Report URI classified, 24 (15%) had a policy that blocked the payload, and a policy that allows the vendor's address can't stop code that comes from that address. A tight policy would have limited what the injected code could load and where it could send data.
Is hosting my own copy of a vendor script safer?
Not for this kind of attack. Report URI says customers who served the Optimizely script from their own domain were affected too, because the content comes from the vendor's project.
How do I know if my site was affected?
Only Optimizely customers who used its Web Experimentation snippet in the affected window were involved. Check your project's custom code as described above, and ask Optimizely which of your projects were changed.
Has this been given a CVE number or added to a known-exploited list?
I found no CVE for it, and nothing for Optimizely in CISA's Known Exploited Vulnerabilities catalog when I checked on November 17. It's an incident at a vendor, not a bug in software you install.
Sources
Need a web developer in Nashville?
PHP, WordPress and Next.js. Free quote, and I usually reply within a couple of hours.
caleb@calebdorris.com and call or text (615) 914-1073