A trusted website tool became a delivery route for malware this week. An attacker abused a flaw in Optimizely's web experimentation platform to slip malicious JavaScript into some customers' projects. Because the code loaded from Optimizely's own content network, visitors' browsers treated it as safe.

Security researcher Scott Helme says the code reached visitors of 178 organisations on November 16. Names reported include Zoom, BBC, CNN, Salesforce, GitLab, IKEA, HSBC, Equifax, Air France-KLM, Ledger and Peacock. Banks and financial firms were the largest group, with 32 affected. Helme found the malware in 188 of 1,611 Optimizely snippets he checked and believes the real number is higher.

The payload was nasty. It swapped crypto wallet addresses, skimmed card details from payment forms, stole cookies and screenshots, and pushed exploit kits at iPhones running iOS 18.6 or older. Attacker wallets took in about $7,040, mostly in Bitcoin.

Optimizely says it has fixed the flaw, removed the injected code, secured affected accounts and added new protections. Other researchers have traced similar tampered scripts to three more web services, with the earliest dating to November 13.

The lesson is about Content Security Policy (CSP). Only 24 of the affected organisations had a policy strict enough to stop the attack, and 68 had none at all. Simply allowing a vendor's domain gives no protection when that vendor is the one compromised.

What to do now:

  • Review every third-party script on your site and remove the ones you do not need.
  • Tighten your CSP, avoid allowing eval, and block unexpected outbound connections.
  • Update iPhones to the latest iOS.