Insights

AI Security

OPTIMJACK is a reason to inventory every third-party script on your patient portal

Unit 42 says an attacker abused a flaw in Optimizely's Web Experimentation platform to serve malicious JavaScript from the vendor's own CDN to visitors of at least 178 organizations' websites. Any HealthTech sign-up flow or patient portal that loads vendor scripts should know exactly which ones run on its sensitive pages.

November 27, 2026 · 6 min read

OPTIMJACK is a reason to inventory every third-party script on your patient portal

On November 16, a threat actor exploited a vulnerability in Optimizely's Web Experimentation platform to inject malicious JavaScript into customer accounts, and Unit 42 says that code reached visitors of at least 178 organizations' websites. The tampered code was served from the vendor's legitimate content delivery network, under the vendor's own certificate.

Unit 42 calls the campaign OPTIMJACK, and its one-line lesson is the best summary I have read: "any vendor script with dynamic execution privileges on your site is part of your direct production code." That framing applies to patient portals and HealthTech sign-up flows as much as to the retail and media sites that were hit.

I want to be precise about who was affected. Unit 42 describes the affected organizations as including well-known media, technology, and financial services brands. It does not name a healthcare organization, and neither will I. The reason to write about it here is that the same pattern, a trusted vendor script running on a sensitive page, is common on patient-facing sites.

What happened, at the level a defender needs

According to Unit 42, the attacker placed malicious JavaScript in the custom Project JavaScript field of customer accounts. Every site that loaded its experimentation snippet from Optimizely then delivered that code to its visitors. Nothing on the customers' own servers changed.

Once it loaded in a visitor's browser, Unit 42 says the code did three things. It replaced cryptocurrency wallet addresses that visitors copied with the attacker's own. It collected card details from checkout forms. And it attempted to deliver exploit kits to iPhones and iPads. I am not going further into how any of that worked. The defensive lesson does not depend on it.

Optimizely patched the flaw, removed the injected code, and secured affected accounts early on November 17. That is a fast response. It still left a window in which every visitor to an affected page ran the attacker's code.

Why a patient portal is exposed to the same pattern

A patient portal or a HealthTech sign-up page is rarely a single application. It is your code plus whatever the marketing, product, and analytics teams have added over the years: experimentation tools, tag managers, chat widgets, session replay, heatmaps, consent banners, and advertising pixels.

Unit 42 puts the risk plainly: "If a third-party script executes on your page, it effectively has the same privileges as your own developers." On a sign-in page, that means the script can read what a patient types. On an intake form, it can read a date of birth, an insurance member ID, or a reason for visit. On a payment page, it can read a card number.

Experimentation platforms are a particularly sharp case, and this is my reading rather than Unit 42's. Their whole purpose is to let someone change what runs on the page from a vendor console, without a code deploy. That is useful for testing a new sign-up button. It also means the code your users run can change without passing through your review, your pipeline, or your change log. A compromise of the vendor, or of one of your own users' vendor console accounts, has the same effect.

Build the inventory

The inventory I would build has one row per script, per page type. Patient portals usually have a short list of sensitive page types: sign-in, account recovery, registration, intake forms, messaging, record download, and payment. For each script on each of those pages, record:

  • The vendor, and what the script does in one sentence.
  • Who added it, and which business owner still needs it.
  • Whether its behavior can be changed from a vendor console without a deploy on your side. This is the OPTIMJACK question.
  • Who has access to that vendor console, and whether those accounts require phishing-resistant sign-in.
  • Whether it loads on sensitive pages because someone needed it there, or because a tag manager loads it everywhere.
  • What data on the page it can reach, given that it runs with the same privileges as your own code.
  • Whether your contract or business associate agreement with that vendor covers the data the script can see.

That last line is the governance part. A script that can read an intake form is handling whatever the form collects, whether or not anyone intended it to. If the inventory shows a vendor touching data that no agreement covers, the fix is to remove the script from that page, not to paper over it.

Expect the first pass to be uncomfortable. Some scripts will have no owner, and some will belong to campaigns that ended long ago. I described the related problem of forgotten vendor access in the post on the integration you forgot.

Segment the sensitive pages

Unit 42's main recommendation is segmentation, with the goal that "a compromised vendor script should never be able to touch sensitive user inputs." It gives two concrete steps:

  • Strip all non-essential marketing, experimentation, and analytics tags from authentication and checkout pages.
  • Place payment collection inside hardened, cross-origin iframes.

For a patient portal, I would read "authentication and checkout" broadly: sign-in, account recovery, registration, intake, messaging, and payment. If an experiment needs to run on the registration page, run it on a version of the page that does not collect health information, or build the variant in your own code where it goes through review.

Segmentation also makes the remaining controls easier. A sensitive page that loads only your own code and a payment iframe is short enough to lock down with a strict content security policy and to monitor for changes. A page that loads twenty vendor scripts is not.

It also fits the broader point I made about defending the portal by behavior. The pages that matter most are a short list. Put your strongest controls there.

If you used an affected platform

Unit 42 says affected organizations still need to act after the patch: audit all project modifications made while the malicious code was available, double-check any code that may have been altered in that period, and treat payment data entered on affected pages as potentially compromised.

If you run Optimizely Web Experimentation on any patient-facing page, start there and talk to the vendor about what it can show you for your account. If you do not, run the inventory anyway. The next OPTIMJACK will have a different vendor name.

Pick your registration page and count the third-party scripts that load on it today. Can anyone on your team name the owner of each one?