OPTIMJACK: what your SBOM misses when code loads at runtime

Malicious JavaScript reached visitors of at least 178 organisations via Optimizely. What it means for vendor scripts in device interfaces and apps.

CRA Evidence Team Published November 23, 2026
OPTIMJACK: what your SBOM misses when code loads at runtime
In this article

On 16 November 2026, an attacker slipped malicious JavaScript into customer projects on Optimizely's Web Experimentation platform. The infected snippets reached visitors of at least 178 organisations, from the same URLs those sites had always loaded.

Nobody had to change a build. A software bill of materials (SBOM) made at build time, or a scan that matches versions, can miss a change like this completely. If your device's admin page or your companion app loads code from a vendor while it runs, the same thing can happen to your product. Here is what to record, what to restrict and what to report.

Summary

  • Same URL, new code: the attacker changed what browsers received at a URL the sites already used. The attack needed no change to the sites' own builds.
  • Scope: a standalone website is outside the Cyber Resilience Act (CRA). A device admin page or a web view in your companion app can be part of your product.
  • SBOM coverage: an SBOM built from package files can miss a script your product fetches at runtime. Record those runtime sources too.
  • Damage limits: enforce a strict Content Security Policy, pin the files you can with Subresource Integrity, and keep vendor tags off login and update screens.
  • Reporting: a vendor compromise is a severe incident you must report when it affects your product's security and meets a severity condition. You don't need a CVE for that.

What happened on 16 November

The attacker placed code in the Project JavaScript field of customer projects and left the rest of each snippet alone. Report URI fetched 1,611 snippets and found 188 infected ones, belonging to 178 organisations. It expects the real number to be higher. The code came from cdn.optimizely.com under Optimizely's own certificate, and Report URI says this was not CDN cache poisoning. Customers who served the snippet from their own domain were hit as well, because what they served still came from their Optimizely project.

The code went after payment details on checkout pages, cryptocurrency wallet addresses and browser sessions. Unit 42 also documented attacks on iPhones and iPads.

The two main sources give different start times. Report URI saw an injected snippet at 04:21 UTC and found every infected file in its sample clean again by 23:11 UTC. Optimizely's incident report puts the first malicious write at 07:51 UTC. It says it detected the activity at 13:34 UTC, closed the flaw at 16:10 UTC and had removed the injected code by 22:24 UTC.

The cause was a flaw in Optimizely's account signup flow. It let the attacker act as administrator users on targeted customer accounts and add code to their projects. In its advisory of 19 November, Optimizely says fewer than 5% of its customers were affected and that this was not a credentials breach. Its incident report adds that no passwords of Optimizely customer accounts were stolen or used.

16 November 2026 04:21 UTC, Report URI observed the earliest injection in its research. 16 November 2026 23:11 UTC, Previously infected files in Report URI’s sample were clean. 17 November 2026, Optimizely’s status page confirmed a vulnerability in Web Experimentation. 18 November 2026, Optimizely’s update identified an account signup flaw. 16 November 2026 04:21 UTC, Report URI observed the earliest injection in its research. 16 November 2026 23:11 UTC, Previously infected files in Report URI’s sample were clean. 17 November 2026, Optimizely’s status page confirmed a vulnerability in Web Experimentation. 18 November 2026, Optimizely’s update identified an account signup flaw.
OPTIMJACK incident timeline
Report URI supplied the sample observations. Optimizely published the later updates. Report URI · Optimizely status

When a web interface is part of your product

The CRA doesn't cover a website that doesn't support a product's function. The public reports don't show whether any affected organisation also ran the compromised code in a product interface covered by the CRA.

In your own product, the same pattern shows up when a router or camera admin page pulls a script from a third-party CDN. It also shows up when a web view in your companion app loads analytics, chat or experimentation code at runtime. If that interface is part of the product, so is the code it runs.

Cloud features follow a different rule. Processing in the cloud counts as remote data processing, and so as part of your product, when you designed and developed the software or had it built under your responsibility, and the product can't perform one of its functions without it. The Commission's guidance gives a useful example. A portal that issues the credentials or tokens a product needs to work can be remote data processing. A pairing portal you built to issue your device's activation token would be one. Only the software modules that deliver the function, and their interfaces with outside services, count. Back-end systems that only process data later, without talking to the product directly, aren't remote data processing. You still assess their risks and address them with controls on the product.

A vendor's own cloud service, built outside your responsibility, is not remote data processing. The vendor's SDK compiled into your app is still a software component of your product, though. For the vendor's service, the guidance asks you to mention it in your technical documentation, describe it, and cover its risks in your risk assessment with controls on the product itself.

Scripts your build can miss

From 11 December 2027 you must identify and document the components in your product, with an SBOM in a common, machine-readable format that covers at least the top-level dependencies. A product placed on the market before that date only falls under these rules if it is substantially modified on or after 11 December 2027.

The CRA doesn't say how to list code a product fetches at runtime. Here is a practical line. JavaScript built into your device admin page is code your product runs, so it belongs in your component inventory and, as a top-level dependency, in your SBOM. A separate API that the page calls, built by the vendor outside your responsibility, is a third-party service. You describe it and assess its risks instead.

Build tools only see the files you give them. Syft, for example, reads JavaScript from package manifests and lockfiles. A script the page loads from a vendor URL never passes through those files. Even once you list it, an SBOM entry with that URL can't tell you when the bytes behind it change. In OPTIMJACK the URL stayed the same and the script changed, so a check that only compares versions can miss it.

The browser receives code by two routes: code included in the product build, or code loaded from a vendor host while the product runs. The product build can stay unchanged while vendor-hosted code changes. The browser receives code by two routes: code included in the product build, or code loaded from a vendor host while the product runs. The product build can stay unchanged while vendor-hosted code changes.
How code reaches the browser
What to record for each dependency
Dependency What to record and check
Bundled code
Record the component and version in the SBOM. Watch for vulnerability advisories and updates.
Vendor-hosted script
Record the source and who can change it in the risk assessment. Include it in the SBOM if it is a product component. Watch for script changes and browser policy violations.
Remote service
Describe its role in the technical documentation and assess the dependency risk. Watch for supplier changes and incident notices.

Tip: in a CycloneDX SBOM, you can model a runtime script as a component with a distribution external reference, and a remote API as a service. A hash you record identifies the copy you reviewed. You still need to watch the file that is actually served.

Record what your product loads

For each runtime source, write down where it runs, who can change it and how you would remove it during an incident. Here is a hypothetical entry for a home router:

Field Example
Product and version
Router RX-200, firmware 3.4.
Screen or function
admin web interface, login and settings pages.
Script or endpoint
https://cdn.vendor.example/tag.js.
Provider
a usage analytics vendor.
Executable code or configuration
executable JavaScript.
Who can change it
anyone with write access to the vendor project.
What it can reach
the admin session, password fields and device settings.
Monitoring
CSP violation reports and vendor incident notices.
Containment
remove the tag through a configuration update, then ship a firmware fix.

In this example, remove the analytics tag from the login page, where it does nothing useful.

Then check the vendor. From 11 December 2027, under the same transition rule, treat the script like any third-party component you integrate, and treat the vendor's cloud service as a third-party service under the Commission's guidance. Ask for evidence of the vendor's security measures, such as ISO/IEC 27001 certification, and ask how it will tell you about changes and incidents. The guidance suggests putting security commitments in your service agreement. When a vendor change weakens its guarantees or your controls, update your risk assessment.

Native apps and remote configuration

A native SDK in your companion app goes into the component inventory like any other library you ship. Its remote configuration needs separate controls, because Content Security Policy and Subresource Integrity don't apply to native networking. Ask the vendor what its remote configuration can change and whether it can download executable code. Limit the SDK to configuration where you can, and log the changes your app receives.

Controls that would have limited OPTIMJACK

A strict Content Security Policy

Report URI crawled 256 hosts of affected organisations and checked their policies against what the payload needed. By its evaluation, 68 organisations had no Content Security Policy and 50 had one that let the payload run and send data out. In 17 more, connect-src blocked the outbound transfers it tested, although the script still ran and could change the page. Only 24 blocked the payload. What saved those 24 was a tight script-src that listed only the hosts each site needed. It blocked the injected loader's request for track.js from the attacker's domain, 1688360.cc.

Report URI names two settings that let the code through. With 'strict-dynamic', a script trusted through a nonce or hash passes that trust on to the script elements it creates and adds at runtime, and experimentation snippets load their code that way. 'unsafe-eval' let the inline fallback version of the payload run. Drop both from your product's web interfaces wherever they still work without them.

Limit connect-src, and where images, frames and forms may go, to what each interface needs. Start the policy in report-only mode with a reporting endpoint, so violation reports show what it would block. Then enforce it. Code served from an allowed URL causes no report until it tries something the policy forbids, so also watch the served file for changes.

Subresource Integrity where you can pin the bytes

Subresource Integrity lets you put a hash on a script tag, and the browser refuses the fetched file if its bytes don't match. It only checks the file fetched for that tag. Scripts that file loads need their own hash. For a file from another origin, the host must support CORS and your tag needs the crossorigin attribute. A pinned file also blocks legitimate vendor updates until you approve the new hash, which is why Scott Helme calls SRI hard to use for code that "can change at any point". For a device admin page, ship fixed copies of the scripts in the firmware with no runtime fetch from the vendor. Those copies then go in your SBOM like any other component.

Keep vendor tags off sensitive screens

Unit 42 recommends removing non-essential tags from checkout and login pages and isolating payment collection. In a product, the same goes for the login, pairing, firmware update and account settings screens. Keep experimentation and marketing tags off them.

When vendor code turns malicious inside your product

CRA reporting has applied since 11 September 2026, including for in-scope products placed on the market before 11 December 2027. There are two kinds of report. Both go to ENISA and to the coordinating CSIRT of the EU country where your main establishment is (the rules name another coordinator if you have none in the EU), through the single reporting platform.

The first is an actively exploited vulnerability in your product. For a flaw in a third-party component, the Commission's guidance explains that it must have been exploited in your product. A flaw in the vendor's own platform doesn't count on its own.

The second is a severe incident that affects your product's security, and a vendor compromise can be one. It is severe when either of these is true:

  • Data or functions: it harms, or could harm, your product's ability to protect the availability, authenticity, integrity or confidentiality of sensitive or important data or functions.
  • Malicious code: it has led, or could lead, to malicious code being introduced or run in your product or in your users' systems.

Injected JavaScript running in a device admin page can meet both. Start assessing a credible alert straight away. You become aware once that first assessment gives you reasonable certainty that a severe incident has compromised your product's security. From then, send an early warning without undue delay and within 24 hours. Unless you have already provided the relevant information, send an incident notification without undue delay and within 72 hours. Unless you have already provided the information the final report needs, send it within one month after you submit the incident notification. Our reporting deadlines overview compares both kinds of report.

What to tell your users

Once you become aware of either event, you must also tell the users affected, and where appropriate all users, about the vulnerability or incident and, where necessary, the mitigation and corrective steps they can take. Where it helps, give that in a structured, machine-readable format. In practice, tell them which versions and screens were affected and when, what to do (change the admin password, end active sessions, update the firmware or app) and where you will post updates.

Frequently Asked Questions

What can we record for a vendor script that has no version?

Record the URL, the screens that load it, the date you checked it and the SHA-256 hash of the copy you reviewed. Then watch the served file, so you notice when it no longer matches.

Is a vendor's change to its cloud service a substantial modification of our product?

Not by itself. The Commission's guidance says a major change to a third-party service outside your responsibility shouldn't count as a substantial modification of your product. You may still need to update your risk assessment and controls. If you change your product in response, assess that change on its own, as you would any product change after CE marking.

Do we need a CVE before sending a severe-incident early warning?

No. The early warning needs neither a CVE ID nor proof of an actively exploited vulnerability. It is due when an incident affects your product's security and meets either severity condition. For how CVE IDs fit into CRA reporting, see what ENISA's first CNAs mean for manufacturers.

Does pinning a loader with SRI also pin the scripts it fetches?

No. SRI only checks the file fetched for the tag that carries the integrity attribute, in this case the loader. Each script the loader adds later is checked only if its own script tag has an integrity attribute.

Does the CRA require us to monitor vendor scripts for changes?

The CRA doesn't name script monitoring. It requires security that fits the risks, a risk assessment that covers the outside services you rely on, and due diligence on third-party components. Where a vendor can change code your product runs, watching that code is one practical way to show you have handled the risk.

Next Steps

Where to start

  1. Pick one shipped product version and list every script and SDK its interfaces load at runtime, using the fields above. Reference that list from your technical documentation.
  2. Remove vendor tags from login, pairing, update and settings screens. Then roll out a Content Security Policy without 'unsafe-eval' in report-only mode before you enforce it.
  3. Add "vendor-served code turned malicious" to your incident playbook, with the severe incident reporting steps and a user notice template.

This article is for informational purposes only and does not constitute legal advice. For specific compliance guidance, consult with qualified legal counsel.

CRA Supply Chain SBOM Security
Share

Does the CRA apply to your product?

Answer up to 11 simple questions to find out if your product falls under the EU Cyber Resilience Act scope. Get your result in under 2 minutes.

Ready to achieve CRA compliance?

Start managing your SBOMs and compliance documentation with CRA Evidence.

Deep dive into CRA topics

Evergreen guides covering the specific requirements, processes, and roles defined by the Cyber Resilience Act.