Attackers A/B Tested Malware on 178 Big Websites via Optimizely

Attackers A/B Tested Malware on 178 Big Websites via Optimizely

A/B testing is supposed to answer gentle questions, like whether the green button converts better than the blue one. On November 16, somebody used Optimizely's experimentation platform to ask a much ruder one: what if every visitor's credit card went to us instead?

One Trusted Snippet, 178 Unhappy Websites

Optimizely confirmed that an unauthorized party exploited a vulnerability in its Experimentation product to add malicious JavaScript to some customer projects. Researchers at Report URI found the code on at least 178 organizations' websites, and KrebsOnSecurity names the BBC, CNN, Equifax, Ledger and Zoom among them. According to The Record, the attacker's loader was planted in the "Project JavaScript" field, the spot where customers add their own custom code.

The payload was a kitchen-sink malware kit. It could skim payment cards, steal cookies and screenshots, and swap cryptocurrency addresses for the attackers' own, and it was rebuilt 26 times during the day. Report URI estimates around $7,500 in crypto was stolen, plus an unknown number of card records. Optimizely says the vulnerable path is blocked, the injected code has been removed, and affected customers have been contacted directly.

Your Allow-List Can't Save You From Your Friends

This is the third-party script problem in its purest form. The snippets came from Optimizely's own infrastructure, so to every browser they looked exactly like the trusted marketing code they were supposed to be. None of these big-name sites got breached in the traditional sense. They got breached by proxy, through a vendor they invited in and handed the keys to the page.

The part worth stealing for your own roadmap: Content Security Policy actually made a difference. Among the affected sites Krebs broke down, 68 had no CSP at all and 50 had a policy loose enough to let the payload and the data theft through. But 24 had a CSP that blocked it entirely, because the malware pulled its goods from domains that weren't Optimizely's. Report URI's crawling puts CSP adoption across the busiest sites at roughly 10%, which means most of the web is still leaving the side door on the latch.

Every <script> tag on your site is a little contract of trust. Read the fine print, and write a CSP that enforces it.

If this story has you side-eyeing every tag in your site's header, our free developer's security checklist for defending against supply-chain attacks is a good place to start the audit.

Source: KrebsOnSecurity