Back to all lessons
Awareness Lessons
2 weeks ago

Malicious Third-Party JavaScript Compromised Major Websites via Trusted CDN

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

Attackers gained administrative access to a third-party vendor's CDN platform and injected malicious JavaScript that was then served to customers of major banks, airlines, and news publishers — all of whom implicitly trusted the vendor's scripts. This attack illustrates that your security perimeter extends to every external script your site loads, since browsers execute third-party code with the same trust as your own. Without strict Content Security Policy enforcement and a maintained inventory of script dependencies, organizations have no mechanism to detect or block unauthorized script changes. The incident highlights how a single compromised vendor can cascade into a widespread data-theft operation affecting payment card details, cryptocurrency transactions, and session cookies across dozens of high-profile organizations.

Tactical Insight

Immediate actions

  • Audit and inventory all third-party JavaScript dependencies currently loaded on your web properties, including indirect/transitive scripts.
  • Enforce a strict Content Security Policy (CSP) with allowlisted script sources and use `integrity` attributes (Subresource Integrity) to cryptographically pin third-party scripts to known-good hashes.

Long-term improvements

  • Segregate sensitive pages (checkout, authentication, banking flows) from general analytics and marketing scripts to limit blast radius if a vendor is compromised.
  • Establish a formal third-party vendor security review process that assesses the security posture of CDN and script providers before onboarding and on a recurring basis.
  • Treat third-party script updates as a change-management event, requiring testing and verification before production deployment.

Detection measures

  • Implement real-time monitoring and alerting for unexpected changes to script hashes or new script sources appearing in page loads.
  • Deploy client-side threat detection or a web application firewall capable of identifying anomalous data exfiltration patterns such as card data or cookie values being sent to unknown domains.

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.