JAMP

Journal of Applied Marketing Practice

ecommerceanalytics

Malicious JavaScript reached sites through Optimizely Web Experimentation projects; Optimizely cites a signup-flow flaw

Sites running Optimizely Web Experimentation served malicious JavaScript to visitors on November 16. Optimizely says the vulnerability was in its account signup flow, that it deployed a fix and notified affected customers.

by Daniel Whitaker ·

What happened

Per Search Engine Journal, malicious JavaScript code injected by an attacker was delivered to users visiting websites that run Optimizely Web Experimentation on November 16. BleepingComputer reported that Optimizely informed them the bug was "in the Experimentation account signup flow". Optimizely says they've informed all customers that were affected. They have blocked the vulnerable access path, released the fix, terminated the active sessions, revoked tokens, and reset access for affected accounts. According to Scott Helme from Report URI, he discovered the injected code in the snippets of 178 organizations, including Zoom, BBC, CNN, Salesforce, and GitLab.

Why it matters

The script was added into the Project JavaScript and thus the code was still served from Optimizely's trusted cdn.optimizely.com domain. The injected code was switching crypto wallet addresses and monitored form fields for card data. Also it was loading the Coruna and DarkSword exploit kits for iPhone/iPad users. The attacker collected ~$7,040 in his wallets as of 7:25 pm UTC on November 16.

Could be more than just those brands. Helme's people analyzed 1,611 Optimizely snippet files (mostly Report URI's own crawl data) and found 188 of them with malicious code. Helme thinks it's probably even more.

Security headers didn't help much for many of the sites we looked at. 68 out of 159 organizations analyzed by Report URI didn't have a Content Security Policy. A lot of the remaining ones had a Content Security Policy that allowed code to run and send data, or a Content Security Policy that only prevented data from sending, but only a small percentage of them prevented the code from running. Simply allowlisting Optimizely's domain in your Content Security Policy won't help you, and 'strict-dynamic' and 'unsafe-eval' can enable the code to run. (both mentioned on Optimizely's own Content Security Policy help page)

There's the greatest risk in checkout. If they're capturing card data into their own form fields they should consider any cards they received on November 16 as potentially compromised. It also suggests they should change secrets on non-HttpOnly cookies if they have any. They couldn't get at the card data people type into the hosted payment iframes, like the ones from Stripe and Adyen, using the script.

Incident is listed on Optimizely's status page under Monitoring. There are no steps for customers. Below checks are for testing account owners teams.

What to do

  1. Search your project code. Look through Project JavaScript and each experiment's custom JavaScript for 1688360.cc and atob(. Flag any other script that your development team did not write.
  2. Read the History log. Each project's History records every Project JavaScript change, and you can filter it by REST API or by the Web Experimentation interface. Send any change you cannot match to a named colleague to your security team.
  3. Tighten account access. Review who holds write access, which API tokens exist and which integrations are connected, then rotate credentials.
  4. Check your checkout setup. If your site collects cards in its own form fields rather than a hosted payment iframe, treat cards entered on November 16 as possibly exposed. Rotate any secrets stored in non-HttpOnly cookies. Tell your payments and fraud teams the same day.
  5. Review your Content Security Policy. Check whether your script-src line relies on allowlisting Optimizely's domain or includes 'strict-dynamic' or 'unsafe-eval', since either can let injected code run. Agree any change with your developers before the next test launches.
  6. Hold new launches until the checks are done. Pause scheduled experiments on affected projects until code, history and access have been reviewed, and record the pause in your test calendar so results are not misread later.

Sources

More on ecommerce