AW Dev Rethought

✂️ Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away - Antoine de Saint-Exupéry

AW Dev Rethought Flash: Optimizely Hack Hits Salesforce, GitLab and 176 More


On Monday, November 16, visitors to the websites of Salesforce, GitLab, the BBC, CNN, Zoom, IKEA, HSBC and more than 170 other organisations loaded malicious JavaScript. None of those companies were breached. The code came through Optimizely, the experimentation platform many of them use to run A/B tests on their own pages.

The code swapped cryptocurrency wallet addresses, stole cookies and screenshots, and, according to researchers, skimmed card details. On iPhones and iPads it loaded extra scripts linked to known iOS exploit kits. It was live for most of the day.


How the Code Got In

Optimizely says an unauthorised party “exploited a vulnerability in Experimentation.” A spokesperson told Gizmodo the flaw was in the account signup flow.

The attacker used that access to write code into the Project JavaScript field of customer projects. That field is meant for a customer’s own scripts. Optimizely’s CDN serves whatever is in it to every visitor of that customer’s site.

So the malware arrived from cdn.optimizely.com, under Optimizely’s certificate. Browsers trusted it, and so did any security policy that allowlisted Optimizely.

Two days later, Optimizely has still not explained how a flaw in account signup gave write access to the projects of unrelated customers.


What the Code Did

Swapped wallet addresses. It replaced addresses for Bitcoin, Ethereum, Solana, TON, Litecoin and several other coins with the attacker’s. It only acted on pages with words like “wallet,” “deposit” or “send,” which made it harder to spot.

Skimmed cards. Helme’s analysis found a card skimmer, added in the afternoon. It captured card numbers, expiry dates and CVVs typed into a site’s own payment forms. Payment fields hosted by a separate provider were out of its reach.

Stole cookies and screenshots. After a swap, it sent the visible page and any readable cookies to the attacker.

Targeted iPhones and iPads. It loaded further scripts that researchers link to the Coruna and DarkSword iOS exploit kits. No confirmed iPhone compromise has been shown so far.

The attacker kept working on it during the attack, and the payload was rebuilt 26 times that day. A sample analysed by Socket contained the address swapper and the iPhone loader but not the skimmer, which fits a payload that changed over the day.


The Scale and the Timeline

Scott Helme of Report URI uncovered the attack. His team checked 1,611 Optimizely snippets and found the malware in 188 of them, belonging to 178 organisations. He believes the real number is higher.

Banks and financial firms were the largest group, at 32 organisations. Technology companies were next with 23, then retailers with 20.

In UTC, according to StepSecurity and Report URI:

  • 04:21: The first injection appears.
  • 05:23: The domain hosting the payload is registered.
  • 13:43: The card skimmer is added.
  • 20:40 to 21:10: Most infected snippets are cleaned.
  • 23:11: The last infected snippet Report URI tracked is clean.

The attacker’s wallets received about $7,040, mostly in Bitcoin. By early November 17 they had been emptied. Hudson Rock could not link those payments to visitors of the affected sites. How many cards were stolen is not known.

None of the 178 organisations was breached. Their visitors were attacked anyway, through a script they had chosen to trust.


What the Companies Have Said

Optimizely confirmed the incident. It says it fixed the vulnerability, removed the injected code, revoked tokens, reset affected accounts and notified customers. It has also added protections against unauthorised code delivery.

Salesforce says it is investigating unauthorised Optimizely changes and has disabled the scripts as a precaution. Equifax says it investigated, stopped using Optimizely, and found no evidence that its systems were compromised. Several other named companies did not respond to Reuters.

Hudson Rock also found tampered scripts from three other vendors (Kissmetrics, StorifyMe and minute-ly), the earliest dated November 13. The researchers say this does not prove the same attacker or the same entry point.


What to Do

If you visited an affected site on November 16:

  • Treat any card entered there between about 04:00 and 23:00 UTC as compromised, and ask your bank to replace it.
  • Re-check any wallet address you copied from those sites in that window.
  • Update older iPhones and iPads to the latest iOS.

If your site uses Optimizely:

  • Check the Project JavaScript field of every project, including encoded variants.
  • Review users and API tokens on your Optimizely account.
  • Search your logs from 04:00 UTC on November 16 for requests to the attacker’s domains.

For anyone loading third-party scripts:

  • Use a strict Content Security Policy. Only 24 of the affected organisations had one strict enough to block this attack.
  • Don’t treat allowlisting a vendor’s domain as protection. The malware came from Optimizely’s own domain.
  • Keep third-party tags off checkout pages, and use payment fields hosted by your payment provider.

50 Machine Learning Algorithms Cheatsheet Most downloaded free PDF 50 Machine Learning Algorithms Cheatsheet Blueprints of Intelligence — 50 ML Algorithms decoded Download free Downloaded 445 times

If this article helped you, you can support my work on AW Dev Rethought.


Rethought Relay:
Link copied!

Enjoyed this post?

Stay in the loop

New posts + weekly digest, straight to your inbox.

or

Create a free account

  • Save posts to your vault
  • Like posts & build history
  • New-post alerts

Comments

Add Your Comment

Comment Added!