On 16 November visitors to many well-known websites loaded malicious JavaScript for hours. The code did not come from the sites' own servers but from the script of Optimizely, a service used for A/B testing. Researchers at Report URI checked 1,611 Optimizely snippets and found malicious code in 188 of them. The 178 affected organisations include Zoom, BBC, CNN, IKEA, HSBC, Equifax and GitLab.
The attacker added a small loader to the "Project JavaScript" field of customer projects, and Optimizely's CDN delivered it to the sites like any ordinary change. The script it pulled in swapped copied crypto wallet addresses for the attacker's own, and sent off card details typed into payment forms, cookies not marked HttpOnly and screenshots of the page. iPhones and iPads on older iOS versions were also redirected to exploit pages. Cleanup started in the evening, but how the attacker gained write access to customer projects is still not fully clear.
The incident puts a simple question to every site owner: which external scripts run on your site, and who can change them? Analytics, live chat, advertising and testing tools all run in the visitor's browser on your site's behalf. Had card details been entered on the bank's or payment provider's own page, or inside its iframe, this skimmer could not have read them. Using a Content Security Policy to limit which domains scripts can talk to, dropping unsafe-eval, marking session cookies HttpOnly and removing tags you do not need, especially from checkout pages, cuts the risk considerably. If you use Optimizely, review the JavaScript in your projects and change your login credentials and API tokens.
Sources: Daily CyberSecurity, GBHackers, The CyberSec Guru.








