Optimizely Malware Attacks Highlight Third-Party Vendor Risks
At least 178 organizations, including several major brands, unwittingly exposed website visitors to hydra-like malware via a third-party platform.
Some of the world’s most recognizable brands unwittingly became conduits for malware this week, after an attacker slipped malicious code into website testing scripts delivered by Optimizely, a platform that allows organizations to experiment with and optimize their online presence.
The attack potentially exposed visitors to sites operated by at least 178 organizations — including Zoom, CNN, Salesforce, and IKEA — to malware capable of stealing payment card details, hijacking cryptocurrency transactions and delivering exploit kits for iPhones and iPads.
A Breach at a Trusted Vendor
Many organizations use Optimizely to run website experiments, test different page designs and personalize content for visitors. To do this, Optimizely embeds scripts in customer websites that can serve different versions of a page or its content to visitors, track their interactions, and measure which versions perform best.
The attackers appear to have exploited this mechanism to insert malicious code into a custom field called Project JavaScript, which allows Optimizely customers to run their own code across website pages.
British Web security monitoring service Report URI, among the first to detect the activity, documented the tampering but said it could not determine how the attackers gained the ability to modify customer projects. “We don’t know how the attacker got write access to so many unrelated customer projects: a compromised Optimizely system, a compromised credential with cross-customer access, or something else. That’s for Optimizely to explain,” Report URL founder Scott Helme wrote.
Report URI said it located and examined 1,611 unique Optimizely scripts. It found malicious code in 188 scripts associated with 178 organizations. The company has published a list of the affected websites on its site, grouped by industry sector.
Digital security firm The Media Trust which is tracking the campaign and the malware as “Hydra-Cart,” described the threat as now contained. Like Report URL, The Media Trust too found Hydra-Cart to include a payment-card skimmer, cryptocurrency address swapper, a cookie stealer, and a loader designed to deliver Coruna and DarkSword iOS exploit kits on iPhones and iPads.
Optimizely itself has said little about the incident so far besides acknowledging it and pinning it somewhat vaguely to a vulnerability in the platform’s Experimentation account sign-up flow. “We’ve fixed the vulnerability and removed the injected code from affected projects. We’ve also taken steps to secure affected user accounts and put additional protections in place to prevent unauthorized code from being delivered,” the company said.
Optimizely did not immediately respond to a Dark Reading request for information on the reported scope of the incident, the exposure window, or how a vulnerability in the account sign up flow could have given an attacker write access to customer projects.
A Pressing Question For Optimizely
“That’s the question every affected customer should be putting to Optimizely right now,” says Justin Beals, CEO and founder of Strike Graph. “They need to know how a new account got write access to other tenants’ projects, which project IDs were changed and when, and whether that path is fully closed.”
Until Optimizely explains the authorization failure, customers can’t judge whether the company’s reported fix addresses the cause or just the symptom, he says.
The incident is a reminder that organizations need strict controls over third-party scripts running on their websites, Beals adds. Most organizations approve a third-party vendor script once during procurement and never revisit it later. Optimizely, for instance passed whatever review the 178 affected companies ran, and the malicious code still shipped from Optimizely’s own CDN under its own certificate.
“The takeaway is that a vendor approval is a point-in-time decision, and the risk changes every time that vendor’s code changes,” Beals says. “You can keep using these tools if you decide where they’re allowed to run.”
Tyler Reguly, associate director of security R&D at Fortra, says incidents like these show why organizations implement a browser security feature called Subresource Integrity (SRI) to verify that externally hosted files, such as JavaScript, haven’t been altered before they are loaded and executed.
“The problem that we have here is that you may include a file in your website that is safe for months or even years and then, unbeknownst to you, a breach occurs within your vendor and that ‘file that’s been safe forever’ is suddenly no longer safe,” Reguly says.
SRI allows organizations to perform version pinning based on file hashes to protect against attacks like the one that went down at Optimizely. “The downside is that it requires a bit more effort and management to maintain your Web pages, which are often seen as ‘set it and forget it’ resources,” Reguly adds.
Chris Nyhuis, CEO of Vigilant, says Optimizely demonstrates what happens when trust becomes an attack surface. “Organizations allowed a third party to deliver executable code into their customers’ browsers, and that trust was exploited,” he says.
The answer isn’t to eliminate third-party technology but to eliminate “blind trust,” Nyhuis says. “Restrict where vendor scripts execute, limit their access to sensitive data, monitor their behavior and changes, and independently validate what they’re doing.”
Furthermore, Optimizely also needs to explain how a flaw in an account sign-up process allowed an attacker to modify executable code belonging to 178 unrelated customers. “For that to happen, there had to be a path around customer authorization boundaries,” he says. “Whether that involved broken tenant isolation, privilege escalation, an authorization flaw, or access to an overly privileged service remains to be established by the forensic investigation.”
Originally published on Dark Reading