Back to all lessons
Awareness Lessons
2 weeks ago

Third-Party Script Injection Exposes Major Sites to Crypto and Payment Data Theft

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

The OPTIMJACK campaign demonstrates how attackers can weaponize trusted third-party JavaScript providers — in this case likely Optimizely — to inject malicious code into high-profile websites without directly compromising them. By hijacking scripts that site owners already trust and load, attackers can silently replace cryptocurrency wallet addresses and harvest payment form data at scale. This is a classic supply chain attack vector: the vulnerability lies not in the target site itself, but in an external dependency it blindly executes. The incident matters because even large, well-resourced organizations like CNN, Zoom, and Salesforce are exposed when third-party script security is not continuously verified. Without strict controls over what client-side code is permitted to run, users of otherwise secure websites can be defrauded without any sign of a breach on the site itself.

Tactical Insight

Immediate actions

  • Audit all third-party JavaScript dependencies currently loaded on your web properties and remove any that are non-essential.
  • Implement Subresource Integrity (SRI) hashes for all externally hosted scripts so browsers reject tampered versions.
  • Deploy a Content Security Policy (CSP) that explicitly whitelists approved script sources and blocks inline or unexpected script execution.

Long-term improvements

  • Establish a formal third-party vendor risk management process that includes regular security assessments of script providers.
  • Adopt a client-side security monitoring solution (e.g., web skimming detection) to alert on unexpected DOM mutations or data exfiltration attempts.
  • Maintain a software bill of materials (SBOM) for all web application dependencies, including front-end scripts.

Detection measures

  • Monitor outbound network requests from your web pages for unexpected domains receiving form or wallet data.
  • Set up real-time alerting on changes to any third-party script content hashes via CI/CD pipeline checks or automated scanning.
  • Review Content Security Policy violation reports regularly to detect attempts to load or execute unauthorized scripts.

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.