Attackers Used Optimizely to A/B Test Malware on Top Websites
Hacker News

Attackers Used Optimizely to A/B Test Malware on Top Websites

At least 178 top web destinations unwittingly served a variety of malware exploits against visitors over the past 24 hours thanks to a security vulnerability involving Optimizely, a company that helps websites customize user experiences and test out new features.

Experts say the incident, which saw data-stealing malicious software silently injected into sites like the BBC, CNN, Equifax, Ledger and Zoom, was exacerbated by the reality that few popular websites enforce strict rules on the sources of third-party content.

Malicious Payload Delivered Through Optimizely

According to a blog post from the security firm Report URI, on November 16 malicious JavaScript code was served to visitors of 178 organizations through Optimizely's platform.

Report URI researcher Scott Helme wrote that the payload delivered by the malicious Javascript was rebuilt 26 times during the day, dropping a multi-purpose malware kit that could steal payment card data, cookies and screenshots, and swap any cryptocurrency payment addresses for the attacker's.

Helme noted the affected websites also served exploit code custom made to attack known vulnerabilities in older Apple iPhone and iPad devices. Known by such names as "DarkSword" and "Coruna," these are zero-click exploit kits that chain together a half-dozen security holes to seize complete control over outdated devices and extract data.

"The important lesson here is that trusted JavaScript doesn't always remain trustworthy," Helme wrote. "A website can be compromised through a third-party dependency without its own code or infrastructure ever being breached."

Optimizely Response

Contacted for comment, Optimizely said that on November 16, 2026 it "identified a security incident in which an unauthorized party exploited a vulnerability in the Optimizely Experimentation to add malicious JavaScript to some customer projects."

"We acted swiftly to contain the incident and have fully remediated the identified vulnerability," reads a written statement shared by Optimizely. "These measures included blocking access to the vulnerable path, deploying a fix, removing the injected code from affected projects, ending active sessions, revoking tokens, and resetting access for affected user accounts. We have also implemented additional protections to prevent malicious code from being delivered in Cloudflare. While the incident has been fully remediated, we are working with third-party experts on a comprehensive investigation."

How Third-Party JavaScript Enabled the Attack

Many top web properties no longer fully display content unless visitors agree to let often dozens of third parties serve JavaScript, a powerful web scripting language that enables interactive content. JavaScript code is run on the user's device, and it can read information displayed in the user's browser and even modify a website's appearance or content.

One reason JavaScript is so heavily used is that it enables fairly precise browser fingerprinting and other ways of tracking visitors and clicks. According to the 2025 Web Almanac by HTTP Archive, the median homepage loads at least 22 JavaScript files.

But as the incident with Optimizely shows, a compromise at a third-party vendor's website can quickly snowball into a supply chain attack against downstream websites that end up serving visitors tampered and malicious JavaScript files.

Zach Edwards is a researcher at Infoblox and the co-founder of the ad-tracking service DecryptAds. Edwards said Optimizely is a vendor which often collects data outside of consent flows, with their JavaScript snippets being embedded as close to the top of the page as possible to ensure that it's one of the first things to render, which is important since the product is primarily built for A/B testing.

"So to make the product work as expected, this code is setup to fire immediately on-page load, and not restrict rendering behind a consent dialog box," he said. "This means that this supply chain attack didn't require any clicking or consent to trigger - most of the impacted clients would immediately serve up the payload as soon as someone loaded the page, further increasing risks from this type of JavaScript snippet being compromised."

Content Security Policies and Mitigation

Websites can minimize the chances that a breach at a third-party content provider spirals into a supply chain attack by taking full advantage of "Content Security Policies" or CSPs, which specify the domain names that are allowed to serve third-party content.

But Edwards said most websites - apart from perhaps the largest e-commerce, social media and financial platforms - don't even bother with CSPs, or else tend to leave them overly permissive for marketing reasons.

"With literally all websites which embed 3rd party JavaScript resources, if you don't have a content security policy then if any of those partners get compromised, new domains can be injected into your website via JavaScript which won't be stopped," he said. "We're in the age of JavaScript supply chain attacks and yet almost no one is talking about why content security policies were invented and how this is largely the solution for operators, even though it's not always simple to get it initially deployed."

How broadly deployed were CSPs at the websites impacted by the Optimizely attack? According to Report URI, 68 of the sites had no CSP at all, while 50 of them had a CSP that still allowed the malware payload and the data theft.

The company found only 24 of the affected sites (15 percent) had CSPs that fully blocked the malicious payload. The overall deployment of CSPs across the Web's busiest sites is somewhat lower - about 10 percent - according to Helme's site crawler.ninja, which scans the top million websites daily for security issues.

Helme said he hopes this incident will encourage more sites to adopt effective CSPs, noting that it could have been far worse: By Report URI's estimates, the purveyors of this malware attack managed to steal only around $7,500 worth of virtual currency from affected users, as well as an unknown number of payment card records.

Helme said he often compares the current widespread lack of CSPs to the Wild West. "Organizations are running all this code, but they don't know what it's doing," Helme said in an interview with KrebsOnSecurity. "This is why we keep seeing such large scale breaches in places [where] there are no checks and rules in place on the code we're running, so this was kind of inevitable. Once an attacker gets to the point of running code on your site, the question is what do they want to do with that and can they write the script to do it. Now with AI that's not a problem anymore."

Protecting End Users

Internet users can control the JavaScript elements allowed to run on webpages by using simple script-blocking plugins like NoScript. But these tools have always only been effective for diehard security and privacy nerds who are willing to put up with sifting through dozens of JavaScript requests on each new website.

Happily, modern ad blocking software can handily block most third-party JavaScript requests. Ten years ago, the standard security advice for end users was to install antivirus and enable a firewall. These days, your ad/script blocker is your firewall.

We explored several options and approaches to blocking ads in our August 2026 story, Who's Tracking You?

Update, Nov. 18, 7:06 a.m.: Optimizely has published a report (PDF) on its initial findings about the attack.

Comments

Using an A/B testing platform as the delivery mechanism is a genuinely uncomfortable escalation: the tool that decides which visitors see which experience was never modeled as a malware distribution channel, so none of the usual detections fire.

The operational discipline angle is what stands out - attackers versioning and measuring payloads like product features means defenders need the same rigor about what their third-party tags are allowed to change. Supply-chain reviews for marketing stacks rarely get the scrutiny payments or auth integrations do; this will change that.

"exacerbated by the reality that few popular websites enforce strict rules on the sources of third-party content." Web of trust! How can one tell if this incident affected them? Great. I went to Drudgereport.com the last few days and did get one of those crazy warning messages that take over the whole screen. I just immediately shut the window down. This was on Firefox on android. What is the hapless end user supposed to do about this? Abandon all hope, ye who logon here NoScript + uBlock Origin + Ghostery So is this why every company online has gone down in the past week, or is the US under attack from something else? Because the lies that I see on TV are outrageous. "Routine Maintenance" "Routers" etc Two issues could be coincidence, but all of these? Do you know what the odds are for MS, Gmail, Banks, FAA, Intuit, AWS, Apple, going down in the same week? And we are being told it is NOT AN ATTACK? WTF. Reporting is dead! So is this why every company online has gone down in the past week, or is the US under attack from something else? Because the lies that I see on TV are outrageous. "Routine Maintenance" "Routers" etc Two issues could be coincidence, but all of these? Do you know what the odds are for MS, Gmail, Banks, FAA, Intuit, AWS, Apple, going down in the same week? And we are being told it is NOT AN ATTACK? WTF. Reporting is dead! OOPS As software programs/websites have gotten more and more complex, the probability of them failing one way or another is an inevitability of that complexity. Every time they add some functionality whether the user wants it or not, it creates a new vulnerability. The question is why are they adding this complexity. I didn't request it. For example, Adobe PDF is out of control. I just want to view and edit PDFs. Now Abobe wants to do everything and makes it very difficult to do what I want. I don't want cookies tracking my web browsing especially when I have little control over how they do it or what they do with the data (dynamic pricing). It is all about money… It's time to pull the plug… AI will kill the software business in a good way by democratizing it. I don't need Adobe. I can have AI create my own PDF reader/editor with the features I want. Not all the glitz Adobe charges me hundreds of dollars a year for, features I don't want and don't use. As entire Adobe suite is cloned online for FREE! Microsoft just discontinued Publisher. So, I had ChatGPT create a clone of Publisher with the features I want. I am cancelling my subscription to Microsoft Office and using open source programs. Free Free at last… This is why I have the noScript add-on to Firefox. I, and only I, get to choose what third-party link to allow. But this is where we are: the Web, which was intended to let users share information, and for the sharee to display it in any way they want to see it in, to now, when it's a marketing platform, with mis-targeted marketing, and almost nothing that's not trying to sell you something. I look forward to '29, with a Democratic administration, and QUALIFIED Cabinet members, so I can, for example, report all the false medical advice ads on youtube. (sorry, there is, in fact, diabetes in Israel, etc, etc.) CSP is still a bit flawed, but is probably the best defense we have against XSS (cross-site script injections). However, having CSP rules in place, would not have prevented this at all since this was a supply chain attack on a trusted provider. Even if they hosted the 3rd party scripts themselves, the downloaded script would have contained the malware. Once that's running, game is over…. they'd just make simple requests to the malicious domain with the stolen information. The end-user would need to have something in place that prevented the outgoing traffic. Making this situation worse, is that many sites (due to incompetence) will put in CORS rules that effectively wildcard allowed origins. (a different attack, but one where you'd be able to make cross-site requests from a scam site with the user's credentials) Unfortunately, AI supplies a lot of people with code that has these vulnerabilities already baked in… garbage in, garbage out… My understanding is that this attack directed the JavaScript to download malware from several domains that were definitely not Optimizely domains, and very much would be caught by a competently implemented CSP.

Read on Hacker News ↗ ← Back to News

Comments

No comments yet. Start the discussion.