Back to all lessons
Awareness Lessons
4 days ago

Trusted Third-Party Script Turns 178 Sites into Card-Stealing Traps

Written by AI from the linked story. Not reviewed by an editor. How this works

Attackers compromised the Optimizely Web platform and injected malicious JavaScript that was then automatically delivered to 178 major websites as a trusted third-party resource — no direct breach of those sites was required. The malware stole payment card details, hijacked cryptocurrency transactions, harvested cookies and screenshots, and pushed exploit kits to iPhone visitors. This incident illustrates how a single point of failure in a widely used SaaS or CDN-delivered script can cascade into a massive supply chain attack affecting millions of end users. Organizations that implicitly trust third-party scripts without monitoring their integrity are effectively outsourcing their attack surface. The damage — financial fraud and credential theft at scale — underscores why third-party code must be treated with the same scrutiny as internally written code.

Tactical Insight

Immediate actions

  • Audit all third-party scripts currently loaded on your web properties and remove any that are not strictly necessary.
  • Implement Subresource Integrity (SRI) hashes on every externally hosted script so browsers reject tampered versions.
  • Deploy a strict Content Security Policy (CSP) that whitelists approved script sources and blocks inline execution.

Long-term improvements

  • Establish a formal third-party vendor risk management programme that includes periodic security assessments of SaaS and CDN providers.
  • Maintain a software bill of materials (SBOM) for all web assets, including external scripts, and review it on a scheduled basis.
  • Contractually require key third-party vendors to notify you of security incidents within a defined SLA.

Detection measures

  • Continuously monitor browser-side telemetry and real-user monitoring (RUM) data for unexpected script behaviour or unusual network calls.
  • Configure web application firewall (WAF) rules and client-side security tooling to alert on new or modified JavaScript payloads from third-party origins.
  • Correlate payment-page anomalies (e.g., unexpected form field submissions to unknown domains) in your SIEM to detect skimming activity early.

Back this up with a control

All controls and vendors

Training helps people spot this. These controls make the attack fail even on the day someone does not.