Optimizely Snippet Hijack: Card Skimmer on 178 Sites
A flaw in Optimizely Web let attackers push card-skimming JavaScript to Zoom, BBC, HSBC and 175 more sites. Why CSP stopped only 15%, what SRI and PCI DSS 6.4.3 cover, and how to audit third-party tags.
Contents
Summary
On November 16, 2026 (UTC), attackers exploited a flaw in the A/B testing platform Optimizely Web and pushed JavaScript that stole card numbers and swapped cryptocurrency payment addresses to the sites of at least 178 organizations, including Zoom, the BBC, CNN and HSBC. None of those companies’ servers were breached. The Optimizely tag each company had embedded in its pages carried the attack code from the legitimate CDN. Even among organizations that sent a CSP, only about 15% stopped the code from running. A third-party tag is not “a measurement tool”; it is the right to run arbitrary code on every page. Marketing and IT need to manage, in one shared inventory, which tags sit on payment pages and who can change what those tags contain.
The 178 organizations were not broken into
First, what actually happened. The account below follows the investigation by Scott Helme of Report URI, who discovered and disclosed the attack, and Optimizely’s own statements. All times are UTC.
Optimizely Web is an A/B testing service that shows different copy or colors to different visitors and measures the effect. Customers embed a one-line tag called the “snippet” on their pages, and browsers load it from cdn.optimizely.com. The snippet includes shared code the customer writes in the dashboard, called “Project JavaScript”, which runs every time a page opens.
At 04:21 on November 16, code that loaded a script from an external domain appeared in the Project JavaScript of the BBC’s snippet. The attacker spread the same modification across many customers and at 13:43 added logic to steal card numbers. Of the 1,611 snippets Report URI checked, 188 had been tampered with, belonging to 178 organizations (banking and finance was the largest sector, with 32). That count covers only what was found; the real number is believed to be higher. The modifications were removed by the evening of the same day.
Optimizely told BleepingComputer the cause was “a vulnerability in the Experimentation account signup flow,” that it closed the vulnerable path, deployed a fix, and invalidated affected users’ sessions and tokens. As of late November, however, it had not explained why a flaw in new-account signup let someone rewrite existing customers’ projects, or how many projects were altered.
There is no sign of intrusion into the victims’ servers or source code. What was altered was a single field on Optimizely, and the snippet arrived from the usual origin with a valid certificate. In many data breaches a vendor leaks data you entrusted to it; here the flow ran the other way, with a vendor injecting code into your pages.
A third-party tag is the right to run code on every page
How could rewriting one field in a dashboard reach visitors of 178 organizations? To see why, look at the position an external script holds inside the browser.
A browser treats any script loaded with <script src> as the page’s own code, wherever it came from. It can read form values on that page, rewrite the screen, and read any cookie JavaScript can access. That power is exactly what lets an A/B testing tool swap copy and colors, and the attacker simply used it.
The diagram below shows how code and data flowed in this attack, and how the outcome differed by payment input method. The attacker changed a setting on Optimizely’s side; each company’s page only loaded the legitimate snippet.
As noted at the top right of the diagram, SRI (Subresource Integrity, which puts a hash of the file in the <script> tag and refuses to run it if the hash does not match) cannot be used against this kind of attack. The content of an Optimizely snippet changes every time the customer edits an experiment in the dashboard. You cannot pin a fixed hash to a script designed to change. The same is true of most marketing tags: ads, tag managers, chat widgets.
Whether card numbers were stolen depended on where the input fields lived. According to The Hacker News, the skimmer read card number, expiry date and security code from the site’s own forms, but could not read fields displayed in an iframe on the payment provider’s domain, such as Stripe or Adyen. The browser’s same-origin policy separates the contents of a cross-origin iframe from scripts on the parent page. Cookie theft likewise did not reach cookies marked HttpOnly, which JavaScript cannot read.
Sites with a CSP stopped only 15% of it
The first defense people name against runaway external scripts is CSP (Content Security Policy), an HTTP header in which the server tells the browser which scripts the page may load and which destinations it may contact. So how far did CSP help the victims this time?
Report URI examined the CSP of 159 affected organizations. 68 had no CSP; 50 had one but allowed both execution and exfiltration; 17 allowed execution but blocked sending data out with connect-src; and 24 (about 15%) stopped the code from running at all.
The attack’s first step came from the legitimate cdn.optimizely.com, so allowlisting that origin does nothing. The CSP example in Optimizely’s official documentation adds a nonce (a one-time value per page) to the snippet tag and specifies 'strict-dynamic'. strict-dynamic extends trust to scripts that a trusted script adds dynamically, a design that fits how external tags keep loading other scripts. But if the trusted script itself is tampered with, the attack code it loads is trusted too. Report URI points to strict-dynamic and unsafe-eval as the settings that let the attack through.
On the other hand, the 17 organizations that allowed execution but stopped exfiltration show a different use for CSP. Even when it is hard to restrict where scripts load from, an allowlist in connect-src can stop stolen data at the point it leaves. That alone is not enough, though: attacks can also exfiltrate through other channels such as image requests.
Across the web as a whole, CSP is still underused. The HTTP Archive Web Almanac 2025 found CSP on 21.9% of pages, and about 90% of those allow unsafe-inline and 77% allow unsafe-eval. The more external tags a site carries, the more exceptions pile up, and the CSP becomes a formality.
Only about $7,000 stolen, but don’t call it small
It is worth weighing the opposite view. Measured by losses, this incident was not large. Report URI counted about $7,040 flowing into the attacker’s crypto wallets in roughly nine hours (StepSecurity estimated about $6,600). An exploit kit targeting iPhones was also served, but no successful device takeover has been confirmed. The tampering was cleaned up within a day.
There are three reasons not to take it lightly. First, card losses do not show up in crypto deposits. How many visitors typed card numbers into a site’s own form is visible only in each company’s logs, and fraudulent use can surface months later. Second, the attacker rebuilt the attack code 26 times in one day and even wrote a hidden version back into Smartsheet’s snippet after it had been cleaned once. That means they kept a way to write; had discovery come later, the damage would have been far larger. Third, between November 13 and 16 the same attacker had planted loaders in other third-party scripts such as Kissmetrics. This was not an Optimizely-specific accident but a method of going after third-party tag providers one after another.
Conversely, “remove every external tag” is not realistic either. A/B testing and analytics tie directly to revenue. The real question is not whether to use external tags, but which pages to put them on.
For Japanese merchants, tokenized card forms sit in the same spot
This section looks at what the incident means in Japan, where card-payment rules for online stores differ from those in other markets. Where would the same weakness appear for a Japanese e-commerce business? That depends on how card payment screens are built.
Japanese online merchants are required not to retain card data themselves (called hihoji-ka, “non-retention”), and there are two main ways to achieve it. One is the link type, where the shopper moves to the payment provider’s page or types into the provider’s iframe. The other is the token type (JavaScript type), where the provider’s JavaScript replaces a card number typed into a field on the merchant’s own page with a token. With the token type, the number never passes through the merchant’s server, but it does sit in plain text in an input field on the merchant’s page. That “site’s own form” is exactly what this skimmer read.
According to the Japan Consumer Credit Association, card fraud losses in Japan hit a record ¥55.5 billion in 2024, of which ¥51.35 billion, over 90%, was from stolen card numbers. Phishing is the main method, but skimming through tampered e-commerce sites is included. Japan’s industry Credit Card Security Guidelines, revised to version 6.0 in March 2025, require e-commerce merchants to address vulnerabilities, but mainly with intrusion into the merchant’s own site in mind. This route, which alters a site without breaking into it, is not covered by password hygiene for your own admin panel or by vulnerability scans.
The international standard PCI DSS already addresses this path. Requirement 6.4.3 of v4.0.1 asks merchants to inventory the scripts running on payment pages and confirm each one’s authorization and necessity, and requirement 11.6.1 asks them to detect tampering with payment pages; both became mandatory on March 31, 2025. These two were removed from the simplified self-assessment for merchants that embed a provider’s payment form in an iframe (SAQ A), but in exchange, eligibility now requires confirming that “the merchant’s site is not susceptible to attacks from scripts” (PCI SSC FAQ 1588). Even with an iframe, the external tags on the parent page remain in scope.
The team that adds tags and the team that protects pages share one list
So where should a company start? In order of priority, and in a form that applies even if you do not use Optimizely:
- Remove external tags from payment, login and account-detail pages: A/B tests and ad tags rarely need to run on pages where people enter card numbers or passwords. Keeping third-party tags off checkout is also among the measures The Hacker News listed. If you use a token-type payment form, compare switching to an iframe-based one.
- Inventory the external tags on each page: You can see which domains your pages load scripts from and contact by saving a HAR file in the browser and checking the per-domain summary in the HAR Viewer. The steps are explained in how to capture and read a HAR file.
- Manage accounts on tag vendors’ dashboards to the same standard as employee accounts: Check who holds dashboard access and API tokens, whether they use multi-factor authentication, and who reviews the change history. As with the 1Password breach, write access that reaches production exists outside your development platform too.
- Tighten CSP from the destination side: If strictly limiting script sources is hard, start by making
connect-srcan allowlist and use reporting (report-to) to find unexpected destinations. - Detect tampering in “the page the browser receives,” not “the files on your server”: Watching files on your own server would not have caught this change. PCI DSS 11.6.1 likewise asks for detection of changes to the page as the browser receives it.
Steps 1 and 2 cost marketing some freedom in measurement and testing. Which pages give up what should be decided by both teams together, after agreeing on who would have to explain to customers if a leak happened.
A/B testing comparisons will gain a column for dashboard security
From here on, this is speculation based on the incident and the analysis above, not confirmed fact.
Suppose the tag team and the page-security team do share one list. The next question is how to choose vendors. Since SRI is not an option, a customer’s safety depends on how well the vendor protects the write side. I expect A/B testing and tag management services to be compared, before features, on dashboard authentication, change approval workflows, change-history notifications and snippet tamper detection.
As AI agents start rewriting A/B test copy and code automatically, this comparison will matter even more. If you cannot trace who wrote “code that runs on every page,” you cannot tell whether a dashboard account was hijacked or an agent followed a bad instruction. As seen with hidden instructions to AI in GitHub issues, designs that give AI write access need to start from the scope of that access.
My view
The heaviest point in this incident, I think, is that most victims put their customers at risk without being breached. Security teams have guarded servers and networks, and nothing happened there. The entry point was the kind of external service that, at many companies, marketing signs up for, deploys through a tag manager, and whose dashboard accounts sit with whoever runs the campaigns.
At many companies, adding an external tag is treated as “a configuration change for measurement” and never goes through security review. But adding one line of tag to a page is the same as granting that vendor, and everyone who can log in to its dashboard, the right to run code on every page you have. Before fine-tuning CSP or SRI, count how many external tags are on your payment pages and how many people inside and outside the company can rewrite them. If you cannot answer, then whichever vendor is targeted next, your company may end up distributing attack code without noticing.
References
- Report URI (Scott Helme), “World’s Largest Brands Infected With Malware Via Optimizely,” November 16, 2026 (updated 17th)
- The Hacker News, “Hijacked Optimizely Scripts Served Card Skimmer and iOS Exploit Kits to CNN, BBC and Zoom Visitors,” November 17, 2026
- Search Engine Journal, “A Trusted Optimizely Script Carried Malware To 178 Organizations,” November 17, 2026
- Optimizely, “Update your site’s Content Security Policies (CSP)”
- HTTP Archive, “Web Almanac 2025: Security”
- PCI Security Standards Council, “FAQ 1588: How does an e-commerce merchant meet the SAQ A eligibility criteria for scripts?,” February 2025
- ECのミカタ, “2024年のクレジットカード不正利用被害額は前年比2.6%増の555億円に 日本クレジット協会集計” (Japanese), March 2025
- ECのミカタ, “「クレジットカード・セキュリティガイドライン」改訂 新たな対策を盛り込んだ【6.0版】” (Japanese), March 2025