Skip to content
Knowledge base

OPTIMJACK: how a hijacked third-party script attacked the websites of 178 organisations

On 16 November 2026 an A/B testing script, loaded from the vendor's trusted CDN, spent more than a dozen hours swapping cryptocurrency wallet addresses and collecting card data on the websites of 178 organisations. None of them changed a single line of their own code. This is what a supply chain attack looks like when it happens in the customer's browser.

On Sunday 16 November 2026 at 04:21 UTC, someone added a few lines of code to the script that the BBC loads on its pages from Optimizely’s CDN. Over the course of the day, the same happened on the websites of Zoom, CNN, Salesforce, GitLab, IKEA, HSBC and more than 170 other organisations. None of them changed their own code, deployed a new release or received a warning. Visitors’ browsers ran the malicious code because it came from the same trusted address as always.

The attack, named OPTIMJACK, is a textbook example of a risk that many security teams still leave to marketing: third-party scripts on their own website. We describe what happened, why most safeguards failed and which controls actually limit the impact. The technical details come from the analysis by the Report URI team that detected the attack, and from Optimizely’s incident notice.

What happened on 16 November 2026?

The attacker injected malicious code into the Project JavaScript field of customer projects in Optimizely Web, a platform for A/B testing and website personalisation. The rest of each script stayed untouched, and the file was still served from the official cdn.optimizely.com address. For the browser and for customers’ IT teams nothing changed: the same host, the same certificate, the same <script> tag in the page code.

The researchers fetched 1,611 distinct Optimizely scripts and found 188 infected ones, belonging to 178 organisations. The authors of the analysis note that the real number is probably higher. Most of the affected organisations came from banking and finance (32), followed by technology and SaaS (23) and retail and fashion (20). Even Optimizely’s own scripts on www.optimizely.com and login.optimizely.com were infected.

Optimizely confirmed the incident on its status page on 17 November at 01:02 UTC. The company wrote that an unauthorised party exploited a vulnerability and named snippet delivery in Web Experimentation as the affected component. How the attacker gained access remains unknown. The researchers list three possibilities: a compromised Optimizely system, a compromised credential with access to many customers’ projects, or something else. It does, however, rule out CDN cache poisoning.

The attack did not start with Optimizely: the same infrastructure had been injecting code since 13 November through scripts from Kissmetrics, StorifyMe and Minute Media.

Key points:

  • The malicious code went into customers’ project configuration, not into the victims’ website code.
  • The scripts still came from the vendor’s trusted CDN, so nothing looked suspicious.
  • 188 infected scripts, 178 organisations, including banks, SaaS platforms and media.

Why didn’t the usual website safeguards notice the attack?

Because from the website’s point of view, the attack did not concern it at all. Application vulnerability scanners, code review, a WAF and deployment monitoring look at what the organisation publishes on its own servers. A third-party script is fetched directly by the visitor’s browser from the vendor’s server, so a change to it bypasses all of these controls.

The second reason is trust written into configuration: a website that loads a script from cdn.optimizely.com usually allows that host in its content security policy, and therefore everything that comes from it.

The third reason is speed. The attacker rebuilt the payload 26 times during the day and added the card-collecting code only at 13:43 UTC. A weekly script check had no chance of seeing any of these versions.

In a classic Magecart attack, criminals break into the shop itself. Here the shop was not breached — the vendor it trusted was.

What did the malicious code do in visitors’ browsers?

The payload had four functions. The oldest was swapping cryptocurrency wallet addresses. The code searched for BTC, Ethereum-compatible, TRON, Solana, TON, LTC, BCH and DOGE addresses and replaced them with the attacker’s — in page text, forms, links, the clipboard and outgoing requests, and on iOS also in the share sheet.

From 13:43 UTC, the script collected payment card data. It watched forms and POST requests, recognised the card number by the Luhn checksum, the expiry date and the CVV, and then sent them to the attacker’s server. Cards typed into hosted payment iframes of payment providers stayed out of reach, because the page code has no access to them.

The third function was stealing cookies and screenshots. When the code swapped an address near payment- or wallet-related wording, it sent the page URL, cookies without the HttpOnly flag, the replaced addresses and a screenshot taken with the html2canvas library. Session cookies without that flag must therefore be treated as exposed.

The fourth function targeted iPhones and iPads: the script loaded an exploit kit matched to the iOS version (Coruna for iOS 13–17, DarkSword for 18.x). According to comments in the code, the kit’s authors themselves considered iOS 18.7.3 and 26.3 and later to be patched.

Key points:

  • Cryptocurrency address swapping, card data collection, cookie and screenshot theft, iOS exploits.
  • Cards typed into a payment provider’s hosted iframe were out of the script’s reach.
  • Cookies without the HttpOnly flag and card data entered on 16 November should be treated as exposed.

How quickly was the infection detected and removed?

About 16 hours passed between the first injection and the mass clean-up. The researchers scanned the scripts between 19:24 and 19:59 UTC, the clean-up began around 20:40 UTC, and by 23:11 UTC all Optimizely files were clean.

The attacker’s main domain, 1688360.cc, was placed on clientHold on 17 November at 00:37 UTC. Losses can only be counted in part. By 19:25 UTC on 16 November, about USD 7,000 had reached the attacker’s wallets, mostly in BTC, and early on 17 November the attacker emptied them. Losses from stolen cards and cookies cannot be read from the blockchain — and these may turn out to be the most expensive for the affected organisations, because they come with obligations towards customers and regulators.

Why did a content security policy stop the attack on only one site in seven?

Because most policies either did not exist or allowed exactly what the attacker needed. The researchers checked the content security policies (CSP) on the affected organisations’ websites. The result: 68 organisations had no CSP at all, at 50 the policy let through both the payload and the data exfiltration, at 17 the payload ran but the connect-src directive blocked the data exfiltration, and only 24 organisations, or 15%, blocked the payload.

The analysis points to two settings that opened the way for the attack: 'strict-dynamic' and 'unsafe-eval'. The first lets a trusted script load further scripts without checking their source — so the trusted Optimizely script could load code from the attacker’s domain. The second allows text to be executed as code, which the payload variant embedded directly in the script relied on.

The HSBC case is instructive: the bank’s policy blocked the track.js file and the data exfiltration, but the embedded copy of the payload run through eval still executed. The attacker prepared three variants: a plain script tag, an address obfuscated with the atob() function and a full inline copy of the code.

The lesson for security teams is not “CSP doesn’t work”. CSP worked where it was strict — the connect-src directive in particular, which limits where a page may send data, blocked the data exfiltration at 17 organisations, even though the code itself ran. We explain the basics of this mechanism in the article what is CSP (Content Security Policy).

Key points:

  • Only 15% of the affected organisations blocked the payload with CSP.
  • 'strict-dynamic' and 'unsafe-eval' opened the way for the attack.
  • A strict connect-src stopped data exfiltration even where the code ran.

Could Subresource Integrity have prevented this attack?

For scripts like Optimizely’s — in practice, no. Subresource Integrity (SRI) means writing the cryptographic hash of the expected file into the <script> tag. The browser rejects a file whose content does not match the hash. It is excellent protection for libraries in fixed versions, such as a specific framework release from a public CDN.

An A/B testing script is variable by definition: it changes with every experiment publication or configuration edit by marketing. A fixed hash would break the tool with every such change.

For dynamic scripts, two controls replace SRI: a strict CSP that limits what a script can load and where it can send data, and change monitoring with an alert on every unexpected modification. PCI DSS requires the latter for payment pages.

What do PCI DSS requirements say about scripts on the payment page?

Requirements 6.4.3 and 11.6.1 of PCI DSS v4.x address a scenario like OPTIMJACK directly. According to the PCI Security Standards Council, which in March 2025 issued a separate guidance document for them, they focus on ensuring that payment page scripts are properly authorised, checked for integrity and monitored for tampering. The guidance also covers managing security-impacting HTTP headers, including CSP.

In practice, an organisation must know every script on the payment page and why each one is there, confirm that a script is the approved one, and detect unauthorised changes to the page and its HTTP headers.

An A/B testing tool on a payment page has access to everything the customer types. The first question in a review is therefore: does this script need to run there? Often it does not, and removing it from that single page eliminates most of the risk. We write more about the standard itself in our guide to PCI DSS for e-commerce.

If a malicious script on an organisation’s website could have intercepted customers’ personal data — card data, session cookies, form contents — the organisation, as the data controller, must assess whether a personal data breach occurred. Article 33 of the GDPR requires notifying the supervisory authority (in Poland, the President of the Personal Data Protection Office, UODO) within 72 hours of becoming aware of the breach, unless it is unlikely to result in a risk to the rights and freedoms of individuals.

The fact that the code was delivered by a vendor does not shift responsibility: the customer entrusted the data to the organisation on whose website they typed it. Where the risk is high, Article 34 of the GDPR also requires informing the individuals themselves.

For entities covered by NIS2, Article 21(2)(d) of the directive also matters: it lists supply chain security among the minimum cybersecurity risk-management measures. A marketing script on a website is part of that chain, even though it rarely makes it into the ICT supplier register.

Key points:

  • An attack through a vendor does not release the controller from assessing the breach and, where required, notifying within 72 hours (Article 33 GDPR).
  • Where the risk is high, the data subjects must be informed (Article 34 GDPR).
  • Third-party scripts on a website are part of the supply chain within the meaning of NIS2.

What should an organisation that uses Optimizely Web do?

The researchers publish a list of actions for the platform’s customers. The first is reviewing the Project JavaScript field and custom experiment code in every project for the 1688360.cc domain, atob( calls and any script the team did not write itself. Searching for the domain name alone is not enough, because one of the variants obfuscated it with exactly that atob() function.

The second is reviewing write access — users, API tokens and integrations with access to projects — and rotating credentials. The third concerns impact. Organisations with card fields in their own forms should treat cards entered on 16 November as potentially exposed. Session tokens and secrets kept in cookies without the HttpOnly flag must be invalidated and regenerated.

The fourth is deploying or tightening CSP: restricting connect-src, dropping 'unsafe-eval' and enabling policy violation reporting, which warns of an attempt to send data to an unknown address within minutes. The last point is deciding whether customers need to be notified.

For visitors, they recommend updating iOS, checking the wallet address before every cryptocurrency transfer and reviewing statements for cards used on 16 November.

How can you reduce the risk of third-party scripts on your own website?

Start with an inventory: every script, its business owner, its justification and the pages it runs on. Scripts are added by different departments, so without an inventory nobody knows the full list.

Then limit the scope: the login page, the customer portal and the payment form should have a minimal set of scripts and a stricter CSP. Card fields are best moved to a payment provider’s hosted iframe — in the OPTIMJACK attack, this effectively cut the script off from card data.

The third step is continuous monitoring of changes in the scripts that remain. The fourth is treating script vendors like any other ICT supplier: reviewing their security, controlling who in the organisation may edit their configuration, MFA on accounts in vendor consoles and an entry in the incident response plan.

Which controls act on which stage of an attack through a third-party script?

The table organises controls by the stage at which an OPTIMJACK-type attack could be stopped and shows their limitations as revealed by this incident.

ControlAttack stageWhat it stopsLimitation seen in OPTIMJACK
Inventory of scripts and their justificationbefore the attackunnecessary scripts on sensitive pagesdoes not stop a script that stays, only reduces the attack surface
MFA and access review in vendor consolesbefore the attacktakeover of the organisation’s account at the vendordoes not help when the vendor itself is breached
Hosted payment iframepayload executionscript access to card datadoes not protect cookies, addresses or other forms
CSP without 'strict-dynamic' and 'unsafe-eval'payload executionloading code from an unknown domain and executing text as codeneeds maintenance and testing with every tool change
Strict connect-srcdata exfiltrationsending data to an unknown addressthe payload still runs, e.g. swaps addresses in page content
HttpOnly flag for session cookiesdata exfiltrationreading cookies via JavaScriptdoes not protect data typed into forms
CSP reporting and script change monitoringdetectiona long-running attackneeds a response process, otherwise the alert wakes nobody
Subresource Integritypayload executionreplacement of files in fixed versionsunsuitable for scripts that change with every publication
Response procedure with an Article 33 GDPR assessmentafter the attackmissed notification deadlinesworks only if third-party scripts are included in it

How can nFlo help secure the scripts on your website?

We help organisations prepare for PCI DSS certification, including meeting requirements 6.4.3 and 11.6.1: from an inventory of scripts on payment pages and their justification, through CSP design, to a process for detecting unauthorised changes. We start by understanding which scripts are really needed and who owns them, because that decides everything that follows.

As part of DevSecOps implementation, we bring script and security header control into the development process, so that a new marketing script goes through the same review as application code.

If you want to check what really runs on your pages and what would happen in an incident similar to OPTIMJACK, let’s talk.

What else is worth knowing about the OPTIMJACK attack?

What was the OPTIMJACK attack?

It was an attack on 16 November 2026 in which malicious code was placed in the Project JavaScript field of Optimizely Web customer projects. According to the researchers who detected the attack, 188 of the 1,611 scripts it checked were infected, belonging to 178 organisations, and the scripts were still served by Optimizely’s official CDN.

What did the malicious code in the OPTIMJACK attack do?

It replaced cryptocurrency wallet addresses with the attacker’s, collected card data typed into forms from 13:43 UTC, sent cookies not protected by the HttpOnly flag together with screenshots, and on iPhones and iPads loaded exploit kits matched to the iOS version.

Would Subresource Integrity (SRI) have protected against OPTIMJACK?

In practice, not for this type of script. SRI blocks a file whose hash does not match the one written in the page code, but an A/B testing script changes with every experiment publication, so a fixed hash would break it. A strict CSP and monitoring of script changes are more effective.

What should an Optimizely Web customer do after the OPTIMJACK attack?

The researchers recommend reviewing the Project JavaScript field and custom experiment code for the 1688360.cc domain, atob() calls and unknown scripts, reviewing write access and rotating credentials, and rotating sessions and secrets kept in cookies without the HttpOnly flag.

Which PCI DSS requirements cover scripts on the payment page?

Requirements 6.4.3 and 11.6.1 of PCI DSS v4.x. According to the PCI SSC, they aim to ensure that payment page scripts are properly authorised, checked for integrity and monitored for tampering, and they also involve managing security-impacting HTTP headers.

Share:

Talk to an expert

Have questions about this topic? Get in touch with our specialist.

Sales Representative
Grzegorz Gnych

Grzegorz Gnych

Sales Representative

Response within 24 hours
Expert consultation
Individual approach

Providing your phone number will speed up contact.

Want to Reduce IT Risk and Costs?

Book a consultation - we respond within 24h

Response in 24h Custom quote No obligations