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.

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.”

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.”

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.”

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.”

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?