Optimizely Script Breach Exposed 178 Websites to Data Theft
The Optimizely breach shows how a flaw in a marketing platform can turn a trusted website script into a delivery channel for data theft. At least 178 websites were observed serving the same malicious code, according to UK security researcher Scott Helme, and the total may be higher.
The affected sites included Zoom, Paychex, Equifax and GitLab, along with customer-facing brands such as Starbucks, IKEA, Mattel, American Eagle, Air France, Mutual of Omaha, Heineken, Home Chef, Cinnabon, Levi, Costco and HSBC. Salesforce also confirmed it was affected. The company said unauthorized changes had been made to Optimizely scripts used on some Salesforce websites, and that it disabled those scripts across preview and production environments as a precaution.
A trusted script became a theft tool
Helme, founder of Report URI, traced the incident to Optimizely Web Experimentation. The product lets customers add team members to development projects; attackers reportedly exploited a flaw in the account signup flow to impersonate a user and insert code into customer projects’ “Project JavaScript” field.
That code was delivered inside the customers’ existing Optimizely snippets. The snippets continued to come from Optimizely’s CDN and carried Optimizely’s certificate, so affected sites were loading a script from a host they already trusted. The customers’ own websites and infrastructure didn’t need to be breached for the malicious code to run.
According to Helme’s report, the malware watched form submissions and POST requests for payment card numbers, expiration dates and CVVs, then sent captured details to an attacker-controlled server. It could also replace cryptocurrency wallet addresses, steal cookies and screenshots, and deliver the Coruna and DarkSword iOS exploit kits to iPhones and iPads.
Payment cards entered into hosted payment frames from providers such as Stripe and Adyen were outside the malware’s reach. Cards entered directly into a site’s own form fields could be exposed.
Containment claims are still being checked
Optimizely said it blocked access to the vulnerable signup path and deployed a fix. In a customer email, it also said it had ended active sessions, revoked tokens, reset access for affected accounts, removed injected code from projects and blocked delivery of the code through Cloudflare. The company described the Experimentation platform as fully secured and said JavaScript modification was no longer possible.
Those assurances drew questions from Frank Dickson, principal analyst at Dickson Research. He pointed to a gap between Optimizely’s reported timeline and Helme’s observations: Optimizely put the first malicious write at 07:51, while Report URI saw the BBC’s Optimizely snippet loading attacker code at 04:21, three and a half hours earlier.
“The forensics report should reconcile that gap,” Dickson said. Customers need the actual start time to determine how long their sites were exposed. He also questioned the certainty of Optimizely’s public statements while its investigation was ongoing and the timeline remained unresolved.
Helme said he couldn’t yet verify that the vulnerability had been fixed. Some infected sites had been cleaned, but he wanted to see whether any were reinfected before concluding that the original flaw was closed.
Security settings can limit the fallout
Helme said the code contained extensive Chinese-language text and linked to infrastructure used by other Chinese actors. He assessed that the operation was likely run by a small group of thieves, while acknowledging that the clues could have been planted to suggest a Chinese origin. The focus on financial data made state-backed activity seem unlikely to him.
Dickson raised a separate concern about Optimizely’s security guidance, which tells customers to allow unsafe-eval in their content security policy. At HSBC, he said, the policy blocked the primary payload and data theft, but a backup copy of the malicious code still ran through that setting.
His advice was to limit script-src to the hosts each page needs, restrict connect-src so scripts can’t send data to unapproved destinations, and remove unsafe-eval where possible. Teams can begin in report-only mode to identify policy changes that might disrupt their sites.
The practical lesson is clear: third-party scripts deserve the same scrutiny as code hosted by a company itself. Customers will need a reconciled incident timeline and evidence that the vulnerable path is closed before they can confidently assess their exposure.