On Nov. 16, malicious JavaScript was served to visitors of 178 organisations through Optimizely Web, according to security firm Report URI. It was written into a field called Project JavaScript, which lets a customer’s team add custom code that runs on every page. I argue that marketing teams should review that kind of field as they review site code: named editors, a second approver, an alert on every change and a page policy that limits what scripts can load.
What the record shows
Optimizely’s status page says “an unauthorized party exploited a vulnerability in Experimentation and used it to add malicious JavaScript to some customer projects.” The company says it fixed the vulnerability, removed the injected code, secured affected user accounts and added protections. Report URI, which sells script monitoring and so has a stake in the lesson it draws, counted 188 infected snippets among the 1,611 it could find and check, belonging to 178 organisations. It says the rest of each snippet was untouched and that the file was still served from Optimizely’s own host. It also says it does not know how the attacker got write access to so many unrelated projects.
Report URI’s timeline puts the first injection at 04:21 UTC on Nov. 16 and the mass clean-up between about 20:40 and 21:10 UTC, so visitors were exposed for roughly 16 hours. It says the attacker rebuilt the payload 26 times that day. The affected list spans sectors: 32 banking and finance organisations, 23 in technology and software and 20 in retail and fashion.
Scott Helme of Report URI wrote that “trusted JavaScript doesn’t always remain trustworthy.”
The strongest objection
The objection is that this was the vendor’s failure to fix, and that Optimizely has fixed it. Marketing buys a testing tool so it does not have to run security for one. Optimizely’s statement does close the hole it found. It does not change what the field is. Any code a team pastes into a dashboard field runs with the full trust of the site, and the next vendor to have a bad day will find the same field waiting.
The page policy makes the difference concrete. Report URI crawled 256 of the affected organisations’ hosts and checked their content security policy against what the payload needed. Sixty-eight had no policy at all. Fifty allowed both the payload and the data theft. Seventeen blocked the theft of cards, cookies and screenshots but not the address swapping. Twenty-four, or 15%, blocked the payload, and Report URI says what separated them was a restrictive list of allowed script sources. Trusting the testing vendor’s host did not help anyone, because the code came from that host.
Three changes for the next budget cycle
First, list every person and API token with write access to any tool where marketers can paste JavaScript. Report URI’s own advice to Optimizely customers is to review who and what has write access and to rotate credentials. Do the same review for every other tool with such a field, starting with the ones on your highest-traffic pages, and include tools that an agency or contractor set up for you.
Second, put those fields behind a second approver and an alert on change, the way we argued agents’ work should be approved before it ships.
Third, ask your security team for a script policy that lists only the hosts each page needs, and for a limit on where the page may send data. Marketing owns the request, because marketing owns the tools whose breakage the policy contains. The experimentation programmes that depend on these snippets are also where the highest-traffic pages get edited most often.
Where I could be wrong
One day of data from one vendor is a thin base, and Report URI’s counts are its own, from snippets it could find. Optimizely has not published a root cause in the notice I read, so the lesson about field access rests on Report URI’s description of where the code was written. If the root cause turns out to sit somewhere else, the page policy and the change alerts still apply. The editor list is the part I would hold to.
Source: Optimizely status page, Web Experimentation Security Incident