What Is a Third-Party Script Attack? Polyfill to Optimizely

A third-party script attack happens when code that a website loads from an outside provider, such as an analytics tag, a chatbot or a shared code library, is changed to do something the site’s owner never wrote. On 16 November, security firm Report URI said malicious JavaScript reached visitors of 178 organisations this way, through the Optimizely Web experimentation tool (our report).

Fines show what the older cases cost. The UK Information Commissioner’s Office fined British Airways £20m and Ticketmaster UK £1.25m over 2018 attacks that exposed customers’ payment details, the BBC reported; together that is £21.25m, and the BA fine was 89% below the £183m the regulator first said it intended to issue, by our arithmetic.

Business Pill · Embedded Dependency

An evergreen Business Engineer explainer on embedded dependencies: what is inside what you buy. It teaches the general idea only and does not discuss any of the attacks in this piece.

The key insight: A third-party script attack changes code that a website loads from an outside provider; Report URI found such code at 178 organisations through Optimizely on 16 November, Sansec said more than 100,000 sites embedded the Polyfill.io domain in 2024, and the UK fines over the 2018 British Airways and Ticketmaster attacks total 21.25 million pounds by our arithmetic.

How the Attack Works

Most large websites run code they did not write. A page might load a testing tool, a chat widget and a library from other companies’ servers, and the visitor’s browser runs all of it with the same access as the site’s own code. If one of those files changes, every page that loads it runs the new version.

Report URI puts the risk this way: “trusted JavaScript doesn’t always remain trustworthy”. It adds that “A website can be compromised through a third-party dependency without its own code or infrastructure ever being breached”.

Card-stealing scripts of this kind are often grouped under the name Magecart. Report URI, for example, describes Confiant’s HexMage research as a Magecart campaign that used a card skimmer.

UK Information Commissioner's Office penalties over the 2018 British Airways and Ticketmaster attacks, as repo
UK Information Commissioner’s Office penalties over the 2018 British Airways and Ticketmaster attacks, as reported by the BBC. BA’s final £20m fine was 89% below the £183m the ICO first said it intended to issue, and the two final fines total £21.25m, by our arithmetic.

Four Cases, From BA to Optimizely

British Airways. The ICO fined BA £20m for a 2018 breach that affected more than 400,000 customers, the BBC reported. Attackers compromised BA’s systems and modified them to harvest customers’ details as they were entered, and it was two months before BA was made aware by a security researcher. In this case the altered code sat on BA’s own systems rather than a supplier’s.

Ticketmaster. The ICO fined Ticketmaster UK £1.25m, the BBC reported, after an investigation found a vulnerability in a third-party chatbot built by Inbenta Technologies, which Ticketmaster had installed on its online payments page. The ICO said payment details had potentially been stolen from more than nine million customers in Europe, and that Ticketmaster took nine weeks to start monitoring activity on the page. Ticketmaster said it would appeal.

Polyfill.io. In June 2024 Sansec reported that more than 100,000 sites embedded a popular open source library through the cdn.polyfill.io domain. It said a Chinese company had bought the domain and the GitHub account that February, and that the domain was then caught injecting malware on mobile devices. Sansec later said Namecheap had put the domain on hold.

Optimizely. Report URI says an attacker wrote a loader into the Project JavaScript of Optimizely Web customer projects, so the malicious file was served from cdn.optimizely.com with Optimizely’s certificate. It found the code in 188 of the 1,611 snippets it checked, belonging to 178 organisations. Optimizely says an unauthorized party exploited a vulnerability in Experimentation and that it has fixed it and removed the code (the HSBC entries).

What the Card Rules Require

The card industry’s standard, PCI DSS, added two requirements in version 4.0. Requirement 6.4.3 is listed as “Manage all payment page scripts that are loaded and executed in the consumer’s browser”, and 11.6.1 as “A change-and-tamper-detection mechanism is deployed for payment pages”.

Both were a best practice until 31 March 2025, after which they became effective, the PCI Security Standards Council says. The Council says the aim is to make sure payment page scripts are properly authorized, checked for integrity and monitored for tampering (our piece on the rules).

How Sites Defend Themselves

Report URI evaluated the content security policies of organisations hit through Optimizely. Of those in its table, 24 blocked the payload with a restrictive script policy, while 68 had no policy at all. It says allowing the vendor’s own host did not help, because the malicious code came from that host.

Report URI says cards entered in hosted payment iframes, such as Stripe or Adyen, were out of the skimmer’s reach, while cards typed into a site’s own form fields were not. Its advice to Optimizely Web customers is to review every project’s custom code, review who can write to the account and rotate credentials.

The Structural Read

As we read the four cases, the common point is that the visitor’s browser runs every script a page loads with the same access, so the weakest supplier sets the risk for the whole page.

As we read the BBC’s reports, the two UK fines were set on different facts: BA’s own systems were modified, while Ticketmaster’s exposure came through a supplier’s chatbot on its payments page.

As we read the PCI Council’s summary, its 2025 requirements turn script inventory and change detection on payment pages from good practice into a requirement.

Report URI, in its report

“A website can be compromised through a third-party dependency without its own code or infrastructure ever being breached”

Three Implications

FOR SITE OWNERS Report URI advises reviewing every Optimizely project’s custom code, reviewing who can write to the account and rotating credentials.

FOR MERCHANTS The PCI Council’s summary lists requirement 11.6.1 as a change-and-tamper-detection mechanism deployed for payment pages.

FOR CHECKOUT DESIGN Report URI says cards entered in hosted payment iframes, such as Stripe or Adyen, were out of the Optimizely skimmer’s reach.

The Business Engineer Lens

This story maps onto the Business Engineer framework AI and the Great SaaS Bifurcation.

The analysis says: “It’s a structural bifurcation driven by two converging forces: the democratization of development through AI-assisted coding and the intensification of enterprise integration dependencies.”

As we read it, third-party script attacks are the security cost of those integration dependencies: each outside script a page loads is one more supplier the page trusts. The analysis does not discuss these attacks.

What Is Not Established

For the Optimizely case, the sources we read do not say who the attacker is, how many card numbers were taken, or exactly how the attacker reached so many unrelated customer projects. Report URI says the real number of affected organisations is likely higher than 178, because it could only check snippets it could find in time.

This Week In The AI Supercycle

AI Lost Its Central Banker, the Lab Oligopoly, and the Future of Open Source

This week’s issue: the Nvidia leadership change, read as the AI build-out losing its central banker: who now finances the GPU landlords, backstops the data centres and sponsors open models, and why two labs are becoming the bank.

Read the full issue →

Business Engineer Framework

AI and the Great SaaS Bifurcation

A Business Engineer analysis of how software splits as AI changes how it is built and how deeply it is wired into the enterprise.

Read the Map of AI →

The Bottom Line

A third-party script attack turns code a site trusts into code it never wrote. The UK fines over the 2018 BA and Ticketmaster attacks total £21.25m by our arithmetic, more than 100,000 sites embedded the Polyfill.io domain according to Sansec, and Report URI found the Optimizely code at 178 organisations on 16 November.

95,000+ executives read Business Engineer for the AI strategy frameworks cited by ChatGPT, Claude, and Perplexity.

A note on sourcing. The Optimizely details come from Report URI’s report of 16 November 2026 by Scott Helme, which we read in full, and Optimizely’s status page entry of 17 November 2026. The British Airways and Ticketmaster fines and the ICO’s findings are as reported by BBC News on 16 October 2020 and 13 November 2020; the Polyfill.io details come from Sansec’s research post of June 2024; the PCI DSS requirement texts and dates come from the PCI Security Standards Council’s Summary of Changes and its blog. The £21.25m total and the 89% figure are our arithmetic.

Sources: Report URI (16 Nov 2026) · Optimizely status page (17 Nov 2026) · Sansec: Polyfill supply chain attack (June 2024) · BBC News: British Airways fined £20m (16 Oct 2020) · BBC News: Ticketmaster fined £1.25m (13 Nov 2020) · PCI SSC: Summary of Changes v3.2.1 to v4.0 · PCI SSC blog: Payment Page Security and Preventing E-Skimming

Scroll to Top
FourWeekMBA