R172 · AI-built software and its verification › Security scanning for AI-written code

The Optimizely injection: a trusted script vendor serving malware to 178 organizations

Read the original

Authors F5, Ismael G (shared)

securityincident-responsevendor

Source: How F5 caught malicious JavaScript in the Optimizely attack (F5 blog; Blücher, Ambastha, Sun, Han), shared by Ismael G. on 2026-11-19. Vendor write-up; incident figures attributed to industry research.

What happened

On 2026-11-16 attackers exploited a flaw in the account signup flow of Optimizely Web Experimentation and injected JavaScript into customer projects. Optimizely's own integration then delivered that code to visitors of every site using it. Industry research counted 188 infected snippets across 178 organizations, with about 16 hours before cleanup began. The same actor had used at least three other script vendors in the preceding weeks. Optimizely confirmed the incident, fixed the flaw and removed the code.

The payload (track.js) could swap cryptocurrency wallet addresses, skim payment card fields in the Magecart pattern, collect cookies and page content, and push a second stage to iPhone and iPad users. None of the affected companies' servers were breached.

Why the usual controls missed it

What worked

Browser-side behaviour monitoring flagged the script on a protected site by what it did: reading sensitive form fields, opening network connections to attacker infrastructure, mutating the page, touching cookies and storage. The customer rejected the script, recorded why, blocked the attacker's domains, and restricted the script's access to payment fields.

Blocking the domain alone is not enough: code already loaded can keep executing after the destination disappears. Restricting field access keeps the data out of reach even while bad code runs. The two controls cover each other's gaps.

Tradeoffs

Failure modes to watch

Review checklist

Cited in field guides

Connections

See R172 on the knowledge map

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.