The Optimizely incident, which affected 178 organizations, including Zoom, the BBC, CNN, Salesforce, GitLab, and IKEA, and served malicious JavaScript to their visitors, is part of a preventable pattern: Unmediated Third-Party Access.
The affected organizations had effectively granted a vendor the standing ability to introduce new executable code into their websites.
Here's how it works: When you load JavaScript from an external resource, whatever code that resource serves when a visitor opens your website can be executed in the visitor's browser. You have effectively surrendered control.
This can be prevented by:
- Subresource Integrity (SRI): A native browser feature that verifies the received code against a trusted cryptographic hash.
- Dependency auditing: Checking the code for additional external dependencies that can be loaded dynamically at runtime.
But that's just the technical side. The compliance implications are even more interesting:
Can you really claim to have a sound software change-control process when you load unchecked JavaScript from third-party CDNs?
If the answer is "No," that raises serious compliance questions under frameworks such as DORA, SOC 2, NIS2, PCI DSS, and ISO 27001.
If you take cybersecurity and compliance seriously, vendor dependence must move from "trust only" to "trust within strict limits and verify every change."