USPA Nationwide Security
The WatchlineReporting on security and public safety.

A compromise at Optimizely injected malicious JavaScript across 178 websites, and the script was allowed to be there

Published Last modified 7 min read

By Albina Bieci, Staff Writer

One compromised vendor reached 178 websites through 188 customer projects, with payloads that swapped wallet addresses, skimmed card data and targeted iOS visitors. The controls most teams rely on were structurally unable to stop it.

Illustration of an office desk at dusk with a laptop showing an abstract checkout layout, a credit card beside the keyboard and a second monitor showing lines of code.
An editorial illustration of a client-side payment compromise scene. It is not a photograph of any affected company's workplace.Illustration: The Watchline

SAN FRANCISCO

Attackers exploited a vulnerability in Optimizely's website experimentation platform to inject malicious JavaScript across 188 customer projects, reaching 178 major websites including Zoom, CNN, Salesforce, HSBC and Equifax, according to reporting by Krebs on Security and Newsweek.

The injected code did three things that security researchers have documented in similar campaigns. It swapped cryptocurrency wallet addresses displayed on the page, it skimmed payment card data entered by visitors, and it delivered exploit kits to visitors browsing on iOS devices. Newsweek published commentary from researcher Scott Helme describing a multi-month financial trail behind the campaign and the page-view exposure that came with it.

This is the third-party script problem in its purest form. The customers did not install anything malicious. They added a vendor whose product executes JavaScript on their pages by design, and when that vendor was compromised, the customers' visitors were the ones affected.

What has been confirmed

The vulnerability was in Optimizely's experimentation platform. Malicious JavaScript was injected across 188 customer projects. The number of major websites reported as affected is 178. Named organizations include Zoom, CNN, Salesforce, HSBC and Equifax. The payload behavior documented in the reporting covers wallet address substitution, card skimming and iOS exploit delivery. Helme's analysis, published by Newsweek, describes a financial trail extending across several months and quantifies page-view exposure.

What remains open is the full customer list, the exact start date of the injection, whether any organization has confirmed data theft to regulators, and what the notification obligations will be for each affected company. Those answers will arrive through breach notifications and regulatory filings rather than through the initial reporting.

Why an experimentation platform is the most privileged script on the page

A/B testing tools are built to change what a visitor sees. To do that, they must be able to modify the document after it loads, run arbitrary code in the visitor's browser and read what the visitor does. There is no reduced-privilege version of that capability. A testing script is functionally a content injection system that a vendor operates on your behalf.

That design is legitimate and widely used, which is what makes the category worth understanding. A marketing tag can usually be limited to a narrow function. An experimentation platform cannot, because its function is to rewrite the page. When the vendor's own systems are compromised, the attacker inherits that same ability across every customer at once, from a single vantage point, with no need to touch any customer's infrastructure.

The scale is the consequence of centralization. One platform, one compromise, 178 websites, and a payload that can be tailored by hostname. The attacker does not have to decide which bank to attack. The script decides for them when the page loads.

Why the usual client-side controls did not stop it

Content Security Policy is the primary defense against injected script, and it works by naming which origins are allowed to execute. When the malicious code arrives from the vendor's own allowed origin, the policy has nothing to block. The origin is on the list because the business requires it to be.

Subresource Integrity is the other standard answer, and it is structurally incompatible with this class of tool. Integrity hashes pin a file to an exact byte sequence, which means the file cannot change. An experimentation platform changes its payload constantly by design, and the hash approach breaks the product. Some teams resolve that conflict by omitting integrity attributes for third-party scripts, which is exactly the gap this attack used.

What remains is monitoring, and monitoring is thin. A script that has been authorized to rewrite the page can also be authorized to observe everything on it. Detecting a malicious change from inside the browser requires either a comparison against a known-good baseline or a third-party service watching the vendor's behavior, and most organizations run neither.

What the financial trail suggests about detection timing

Helme's characterization of a multi-month trail is the part of the reporting that matters most operationally. A skimming campaign that runs for months on high-traffic sites accumulates enormous page-view exposure, and it does so invisibly to the organizations involved because the evidence lives in the browser rather than in server logs.

The pattern is consistent with what payment skimming investigations find repeatedly: the compromise is discovered by an external researcher or a card network fraud alert rather than by the site owner. Server-side monitoring sees normal traffic. The page returns a 200. The script is doing exactly what a script is allowed to do.

That is also why the disclosure sequence tends to be slow. A site owner has to determine which visitors saw the modified page, which is a function of the vendor's delivery logs and the customer's own page-view records, and then determine whether card data was entered during those sessions. Both questions are answerable, and neither is quick.

What site owners should do this week

Start with a script inventory, written down rather than remembered. List every third-party script on the site, the business owner of each one, what it can read and whether the vendor needs to modify the page at all. Scripts whose function does not require page modification should be constrained or removed. The list will be longer than most teams expect.

Second, review payment pages separately. A checkout page should carry the smallest possible script footprint, and any script that cannot be justified on a payment page should not be there. Card skimming is the most expensive outcome of a client-side compromise, and the payment page is where it lands.

Third, set up a baseline comparison. Load the site on a schedule, capture the executed script origins, and alert when an origin appears that is not on the approved list. This does not detect a change inside an approved vendor's payload, and it does catch the more common failure of an unapproved script appearing.

Fourth, ask the vendor the questions that matter. What is their code review process for payload changes, who can deploy, what logging do they retain for customer delivery, and how quickly can they produce the record of which customers were served which payload. The last question is the one that determines how a disclosure goes.

The audit angle

USPA's free automated website security audit reviews the third-party scripts a public page loads, alongside transport security, response headers and cookie attributes. It reports what is present and where it came from, which is the starting point for the inventory described above. It is a preliminary automated review of the public surface and does not audit a vendor's internal security program, so it cannot detect a compromise inside an approved platform.

That limitation is worth stating plainly in a week like this one. The value of an external review is that it produces a written list of what the site is actually doing, from outside, without depending on anyone's memory.

Related coverage

USPA reported this week on its cybersecurity practice expanding into website security upgrades and secure rebuilds, which covers the script governance work described here as part of a larger remediation program.

For the same class of risk seen from the inside, the OpenAI conference room bugging case is the physical counterpart: an asset nobody audited, sitting where it could observe everything.

On the service side, USPA's cybersecurity practice covers script governance as part of a wider remediation program, and the corporate risk intelligence practice handles third-party exposure for organizations that cannot audit a vendor directly. The phishing and social engineering resilience case study is the closest published example of reducing a human-layer attack surface on a fixed schedule.

The lesson that survives the incident

Third-party JavaScript is a delegation of trust, and the delegation is broader than most contracts describe. Organizations that treat their script list as a security asset, with owners, justifications and monitoring, will handle the next supply chain compromise as a notification event. Organizations that treat it as a marketing decision will learn about it from a researcher, a network or a journalist.

What a realistic script governance program looks like

A program that survives a vendor compromise has four parts, and none of them requires a large budget. The first is a written inventory with an owner for every script, reviewed on a schedule rather than after an incident. The second is a rule that payment pages carry only scripts with a documented business need, enforced in code review rather than by policy memo. The third is a monitoring baseline that records which origins execute on each template and alerts on additions. The fourth is a rehearsed notification path, so that when a vendor discloses a compromise, someone can answer within a day which of your pages loaded their payload and during what period.

The last item is the one most organizations fail, and it is the one that determines whether a disclosure is a controlled statement or a scramble. Vendor logs, page-view records and deployment history all have to line up, and the alignment is only possible if the records were retained in the first place.

The iOS component of the payload deserves separate mention. Delivering an exploit kit only to visitors on a particular platform is a targeting decision, and it indicates the campaign was built with capability beyond card theft. Visitors who browsed an affected site on an iPhone during the exposure window should treat the device as potentially compromised, which in practice means updating it and reviewing its configuration rather than assuming a factory reset is required.

USPA Nationwide Security advises clients on third-party risk, website security remediation and the physical security posture that surrounds a public-facing brand. The advisory desk answers at (800) 214-1448.

Services in San Francisco, CA

Free automated review

Free Website Security Audit

See how your public homepage handles encryption, security headers, cookie settings and third-party scripts, then receive a written report by email with a suggested next step for every observation.

  • HTTPS and redirects
  • Security headers
  • Cookie attributes
  • Third-party scripts
Run the free check Request a full assessment

Preliminary automated findings. Not a certification, not a penetration test, no credit card required.

Sources

About the reporter

Albina Bieci

Staff Writer

Staff writer for the USPA Nationwide Security newsroom. Receives newsroom tips, corrections and editorial inquiries.

Author biography and credentials

More from The Watchline