The Hidden Danger in Your Website Third-Party Scripts

The Hidden Danger in Your Website’s Third-Party Scripts

On November 16, 2026, cybersecurity researchers at Report URI uncovered a supply chain attack of extraordinary reach and sophistication. An attacker exploited a vulnerability in Optimizely Web Experimentation, a platform used by enterprises worldwide for A/B testing and digital experience optimization, to inject malicious JavaScript into the scripts that 178 major organizations serve to millions of daily visitors. The campaign, dubbed OPTIMJACK by researchers at Cynet, ran for nearly 19 hours before emergency cleanup operations halted it.

How the Attack Worked

Sites that use Optimizely Web load a per-customer JavaScript snippet from cdn.optimizely.com. Each snippet contains an optional Project JavaScript field where customers can add custom code that executes automatically on every page load. The attacker gained unauthorized write access to this field across many unrelated customer projects and planted a small loader that fetched a payload from an external domain.

The brilliance of the attack lay in its stealth. Because the modified snippets continued to be served from Optimizely’s own Content Delivery Network with valid TLS certificates, visitors’ browsers treated the rogue scripts as completely legitimate. Self-hosting offered no protection either: some customers served snippets from their own domains, but those copies were built from the same compromised project data.

Three loader variants appeared during the campaign. Most snippets loaded the payload directly from a command-and-control domain. A second variant encoded the address in Base64 and decoded it at runtime with atob(), defeating simple keyword searches. A third variant embedded the complete payload inline with eval, ensuring the attack persisted even if the external domain was blocked. This fallback mechanism showed the attacker anticipated takedown efforts.

A Multi-Purpose Attack Kit

The payload file, called track.js, was rebuilt 26 times over the course of the day as the attacker added features and new wallet addresses. It operated as a sophisticated toolkit tailored to each visitor’s browser activity and device type.

Cryptocurrency Wallet Address Swapping

The malware scanned web pages, input fields, links, and browser clipboards for valid cryptocurrency addresses across Bitcoin, Ethereum, TRON, Solana, TON, Litecoin, and other networks. When it found an address near payment-related keywords such as wallet, deposit, or send, it silently replaced the legitimate address with one controlled by the attackers. Copying was not safe either: an address copied from an affected page might already belong to the attacker by the time it was pasted into a wallet application.

Verified blockchain records showed approximately $7,040 in cryptocurrency stolen within nine hours. The attacker’s wallets were later emptied to exchange deposit addresses, and one transfer went to a TRON address previously used in cash-out operations dating back to March 2026, linking this campaign to earlier attacks.

Payment Card Skimming

Added to the payload at 13:43 UTC, the card skimmer monitored form submissions and outgoing network requests for credit and debit card numbers, expiration dates, and CVV codes. It captured data only from fields built directly into a website’s own pages. Cards entered within isolated third-party payment frames such as Stripe or Adyen remained out of reach, a critical distinction that limited the skimmer’s effectiveness on sites using proper payment iframe isolation.

Cookie and Screenshot Theft

Whenever the malware intercepted a wallet swap or payment activity, it exfiltrated the page URL, accessible browser cookies not protected by the HttpOnly flag, and rendered page screenshots to the attacker’s server. This contextual data gave the attacker visibility into exactly which pages triggered successful swaps and what information surrounded each transaction.

iOS Exploit Chains

On Apple mobile devices, the malicious code detected the visitor’s iOS version and loaded hidden iframes delivering two known exploit kits. Coruna targeted iOS 13 through 17, while DarkSword targeted iOS 18.x. Devices running unpatched versions such as iOS 18.6 or earlier visibly reloaded affected pages every 60 seconds as the script repeatedly attempted to trigger the exploit. Code comments in the kit marked iOS 18.7.3 and later, and iOS 26.3 and later, as patched.

Researchers confirmed delivery of the exploit pages but reported no confirmed successful device compromise through this campaign. The conditional delivery mechanism was traced using emulated iPhone browsers, and the evidence showed targeted exploit attempts rather than confirmed infections.

The Scale of Exposure

Report URI scanned 1,611 Optimizely snippets and identified 188 infected files spanning 178 organizations, including Zoom, CNN, BBC, Fox News, IKEA, HSBC, Equifax, Salesforce, GitLab, Air France-KLM, Ledger, and Peacock. Even Optimizely’s own corporate and login domains carried the injected script during the window of exposure. Banking and finance accounted for the largest share with 32 organizations, followed by technology and SaaS with 23, and retail and fashion with 20.

The real number is likely higher. The review covered only snippets the researchers could locate in time, and the payload changed multiple times during the day, meaning a single file hash would not capture every version.

Timeline From Injection to Takedown

  • 04:21 UTC, November 16 — First injection observed in the BBC’s Optimizely snippet, loading an earlier injector from webshell[.]lol
  • 05:23 UTC — Command-and-control domain 1688360[.]cc registered after TLS certificates were issued
  • 08:28 UTC — Cryptocurrency clipper payload first observed on bbc.com
  • 13:43 UTC — Card skimmer added to the payload
  • 17:13–17:57 UTC — Second iOS routing host added; visits from iOS 18.6 or earlier began receiving exploit iframes
  • 19:24–19:59 UTC — Researcher sweep finds 186 infected snippets
  • 20:40–21:10 UTC — Mass cleanup across affected projects
  • 23:11 UTC — All infected files confirmed clean
  • 00:37 UTC, November 17 — Main payload domain suspended
  • 01:02 UTC, November 17 — Optimizely posts official incident notice

Why Content Security Policy Decided the Outcome

When researchers audited 256 host domains belonging to affected organizations, they discovered that 68 had no Content Security Policy configured at all. Only 15 percent had policies strict enough to block the unauthorized payload from executing. This finding underscores a persistent gap in front-end web defenses: many organizations trust scripts from reputable CDNs without enforcing strict execution boundaries.

Allowing cdn.optimizely.com in a CSP did not help, because the malicious code originated from that very host. Policies relying on strict-dynamic or unsafe-eval permitted the payload to run on some sites. The attack demonstrates that CSP must go beyond domain allowlisting to include strict script-src and connect-src directives that limit what trusted scripts can do.

Lessons for Organizations and Visitors

For Site Owners

  • Audit third-party scripts regularly: Inspect Project JavaScript fields and custom code in every experiment for unfamiliar domains, atob() calls, or scripts your team did not write
  • Rotate access credentials: Review all users, API tokens, and integrations with write access to your experimentation platform and rotate their credentials after any incident
  • Enforce strict CSP: Start in report-only mode, restrict script-src and connect-src, enable reporting, and remove strict-dynamic and unsafe-eval wherever possible
  • Keep third-party tags off checkout pages: Limit which external scripts can run where card data is entered, and route payments through provider-hosted iframes
  • Assume exposure and notify: If your site served the malicious code, treat cards entered on affected dates as potentially exposed and consider customer notification

For Site Visitors

  • Update Apple devices: Move iPhones and iPads to iOS 18.7.3 or later, or iOS 26.3 or later
  • Verify cryptocurrency payments: Compare any payment made on November 16 with the intended address; if they differ, the address may have been swapped
  • Monitor card statements: If you made purchases on affected sites, watch for unauthorized charges
  • Check hardware wallets: Verify wallet addresses on a hardware wallet’s screen rather than trusting copied text

The Broader Supply Chain Threat

The Optimizely attack is the latest in a series of supply chain compromises that exploit trusted third-party infrastructure. The same operator was active before the Optimizely wave: between November 13 and 16, the injector appeared in scripts from Kissmetrics, StorifyMe, and Minute Media. Its first known appearance dates to September 17 on Turkish websites through an SEO backlink panel script. This pattern reveals a threat actor systematically probing third-party script providers for write-access vulnerabilities.

The attack reached 178 organizations without touching their own infrastructure. The weak point sat with a vendor whose script every site had approved, which is exactly where internal monitoring tends to have no visibility. As enterprises increasingly rely on third-party services for analytics, experimentation, and personalization, the attack surface extends far beyond their own servers.

The global cybersecurity market is projected to grow from $223 billion in 2025 to $346 billion by 2029, according to McKinsey, driven largely by the escalating frequency and sophistication of supply chain attacks. Organizations must extend their security posture beyond perimeter defense to include continuous monitoring of every third-party script that touches their web properties.

The Optimizely incident proves that trust in a reputable vendor is not a substitute for verification. When a single compromised platform can turn the world’s most trusted websites into malware delivery channels, the only viable defense is layered: strict content security policies, regular script audits, credential rotation, and a presumption that any third-party dependency may become an attack vector.


Edited by Palawan @QUE.COM
Website: https://QUE.COM Intelligence
Sponsored by: https://MAJ.COM AI Autonomous


Discover more from QUE.com

Subscribe to get the latest posts sent to your email.

Leave a Reply

Connect with

Discover more from QUE.com

Subscribe now to keep reading and get access to the full archive.

Continue reading