Learn

Credential theft

When Your Own Website Steals Logins

On 16 November 2026 a great many well known websites spent part of a day serving malicious code to their own visitors. Nobody broke into those companies. An attacker got into one analytics vendor and wrote code into the snippet that each customer already trusted and already loaded. The code then ran on the customer's own domain, inside the visitor's session, with every permission a first-party script has. If you run any third-party tag on your website, and you almost certainly do, this is the attack worth understanding before it is your vendor.

Why third-party scripts are the gap your other controls cannot see

Every control you have assumes the threat arrives from outside your perimeter. A third-party script does not. It arrives in the page you published, from a vendor you chose, over a connection your policy permits, and it runs on your own domain with the privileges of code you wrote yourself. That is the whole problem, and on 16 November 2026 a lot of very large organisations found out what it looks like in practice.

The incident is specific enough to learn from. Optimizely's status page, updated 18 November at 14:49 UTC, states that "On 16 November 2026, an unauthorized third party exploited a flaw in the Optimizely Web Experimentation account signup flow." The company also says "Less than 5% of our customers were impacted. No other Optimizely product was affected." An earlier entry, 17 November at 01:02 UTC, says the vulnerability was fixed and the injected code removed from affected projects.

Note where the malicious code lived. It was written into each victim project's Project JavaScript field, which customers edit themselves as a normal part of using the product, and it continued to be served from the vendor's own content delivery network. One researcher's summary is the clearest statement of what this was not: "Optimizely's CDN served exactly what it was given; this was not a CDN cache-poisoning attack." No package was poisoned. No delivery network was hijacked. Somebody edited a field.

On scope, be careful with the numbers you repeat. The widely quoted figure is 188 affected projects across 178 organisations, and it comes from one organisation fetching 1,611 snippets it already held in its own crawl data. Its own wording is that the real number is likely higher because it could only check snippets it could find in time. Treat it as a floor from a convenience sample, not a census. Among the organisations named by sources we read as having served the modified snippet are Zoom, the BBC, CNN, Salesforce, GitLab, IKEA, HSBC and Equifax. Several more appear in press lists without confirmation, which is a different thing.

What the code actually did, which is not what you would guess

Most coverage of an incident like this reaches for payment card skimming. That is not mainly what this was, and the difference changes who needed to worry.

The injected snippet was a loader, published in three variants, one of them hidden behind base64 encoding. It pulled down a kit with several functions. The component that actually earned money was a cryptocurrency address swapper, which replaced addresses only when they passed a checksum and appeared near payment-related wording, including addresses sitting on the clipboard. There was a card skimmer, but it read only the site's own form fields. There was cookie theft paired with a screenshot capture, which fired only after an address swap near payment wording. And there was a conditional stage aimed at iOS, which is documented as delivered rather than demonstrated, with the kit's own logging recording it as not weaponised.

The measurable proceeds were around 7,000 US dollars, and the researchers tracking it say the chain does not prove which transfers came from victims. Hold that number next to the list of organisations above. The reach was enormous and the take was trivial, which tells you this was opportunistic rather than targeted, and that the same access in more patient hands would have been worth a great deal more.

Two limits of the payload are worth knowing, because they are also design recommendations. Cookies marked HttpOnly were out of its reach, for the reason set out in session cookie theft: a script cannot read them. And payment forms hosted in a cross-origin iframe were out of reach too, because a first-party script cannot read inside one. If your checkout runs in your vendor's iframe rather than in your own page, this attack could not touch it.

The detail that defeats the obvious response

Here is the part worth telling your developer. Later snippets embedded a 24,392 byte copy of the payload inline, set to execute if the remote host failed to respond within about two and a half seconds. The vendor research that documented this states that blocking the external malware host alone was insufficient to remove this code.

Two consequences follow, and both are counterintuitive. Blocking the bad domain at DNS or at the firewall did not stop the attack, because the attack had brought its own copy. And searching your outbound logs for traffic to that domain can produce a clean result on a site that was serving the payload the whole time. If your incident process is "check whether we talked to the indicator", this attack is built to pass that check.

What actually worked, and the honest version of the CSP advice

One researcher assessed 256 affected hosts and sorted them by what their Content Security Policy did. Of those, 24, roughly 15 per cent, blocked the payload outright. A further group ran the payload but had their exfiltration blocked by a restrictive connect-src directive. The rest either had no policy or had one that permitted everything the attack needed.

Its conclusion is specific and we are going to quote it rather than soften it: "What separated the 24 protected sites from the rest was a restrictive script-src." And, pointedly, "Allowing cdn.optimizely.com was never going to help." Permissive keywords were the failure mode, and at one bank the inline copy of the payload ran through eval even though the remote fetch had been blocked.

So the honest advice is layered rather than triumphant. If you deliberately run a vendor's tag, a policy that allows that vendor cannot distinguish their legitimate script from their compromised one. What the policy does is contain the consequences, by restricting where data may be sent, and make the change visible by reporting violations to an endpoint you watch. That is worth having. It is not prevention.

One source caveat, stated plainly: the detection, the scope count and this control assessment all come from one organisation, and that organisation sells a policy reporting service. Its findings are the most specific available and are checkable. Its commercial interest also happens to point at its conclusion. Both things are true.

The requirement that already exists, and what to do this week

If you take card payments online, there is already a rule about this. The payment card industry standard added requirements covering payment page scripts, numbered 6.4.3 and 11.6.1, and the standards council's own description of their focus is that "payment page scripts are properly authorized, checked for integrity, and monitored for tampering". Those requirements became effective on 31 March 2025, so the deadline has passed. If nobody at your company has done the inventory, that is now an open compliance gap as well as a security one.

Four things to do, in order. Inventory every third-party script on your site and name an owner for each, because you cannot govern a list you do not have. Delete the tags nobody uses, which is usually several. Set a restrictive script-src policy with a reporting endpoint, so that the next change is visible to you even if you cannot block it. And move anything that touches payment details into a cross-origin iframe, since that boundary held when nothing else did.

One thing to stop doing. Treating a vendor's security as a procurement checkbox. The flaw here was in a signup flow, not in the script you reviewed. The same logic applies to the vulnerability side of your estate, as covered in exploited vulnerability prioritisation: what matters is which weaknesses are being used, not which ones were on the form.

And if your staff's own browsers were on an affected site while signed in, the exposure to think about is session material rather than passwords. That is the same reasoning as what survives a password reset, and why monitoring for infostealer activity looks for devices rather than for credentials alone.

Common questions

What actually happened?

Optimizely's status page says that on 16 November 2026 an unauthorised third party exploited a flaw in the Optimizely Web Experimentation account signup flow. The attacker then wrote malicious JavaScript into the Project JavaScript field of customer projects, which is a field customers can legitimately edit themselves. From that point the code was served normally from the vendor's content delivery network, because the network was asked to serve it. Optimizely says less than 5 per cent of its customers were affected, that no other Optimizely product was affected, and that it has contacted every Web Experimentation customer directly.

Was this a breach of the affected companies?

No, and that distinction matters for how you respond. None of the affected organisations was broken into. Their websites served malicious code under their own brand because a vendor they trusted was compromised. The direct risk fell on their visitors, whose browsers ran the code on a domain they had every reason to trust. The organisations' own exposure is reputational and, for anyone handling payments, potentially a compliance matter.

Would a Content Security Policy have stopped it?

Not for a site that legitimately runs that vendor's tag, because the code arrived from a host the policy already allowed. One researcher assessed 256 affected hosts and found 24 of them, about 15 per cent, blocked the payload, and what separated those sites was a restrictive script-src directive rather than a permissive one. Its conclusion is worth quoting directly: allowing the vendor's own content delivery network was never going to help. What a policy does buy you is blocking the exfiltration and making the change visible through a reporting endpoint, which is not nothing.

Can I just check whether my site was affected?

Not by looking at it now. Every infected file was clean by late evening on 16 November. If you did not already have a reporting endpoint or retained logs of what your pages served, you cannot establish after the fact whether your site was affected, and your only route is to ask the vendor. Optimizely says it contacted every Web Experimentation customer directly, so start there. This is the strongest argument in this whole article for setting up reporting before you need it.

We block malicious domains at the firewall. Is that enough?

No, and this attack demonstrates why in an unusually clear way. Later versions of the injected snippet carried a 24,392 byte copy of the payload inline, which ran if the remote host did not answer within roughly two and a half seconds. The vendor research that found this states plainly that blocking the external malware host alone was insufficient to remove the code. It also means searching your logs for connections to that domain can return a clean result on a site that was running the payload.

Does Subresource Integrity solve this?

No, and it is worth understanding why, because it is often recommended for exactly this situation. Integrity checking works by pinning a file to a cryptographic hash of its contents, so the browser refuses to run it if the file changes. That depends on the file not changing. An experimentation snippet is supposed to change every time someone edits an experiment, so there is no stable hash to pin. Integrity checking is excellent for a fixed library served from a third party, and structurally useless for a tag that updates itself.

Check your own exposure

Enter a work email and SphereTI checks it against known breaches and stealer logs, then shows you which credentials have been exposed. Free, and it never asks for your password.

Get your free report

Keep reading