IT NewsThe Hacker News

Optimizely Script Hijack Hits CNN and BBC Visitors: Check Your External Scripts

Attackers exploited an Optimizely vulnerability to deliver malicious code through third-party scripts to visitors of at least 178 organisations, including CNN, BBC and Zoom. Visitors can be affected even if your own website was never breached.

CNN、BBC 訪客中招 第三方腳本被劫持

When a third-party script on your website is compromised, your visitors can be affected even if your own systems were never breached. Attackers exploited a vulnerability in Optimizely's Web Experimentation service and delivered malicious code through scripts loaded on customer websites. According to Report URI, which monitors website scripts, visitors to at least 178 organisations received the code, including CNN, BBC and Zoom. The incident is a reminder that the external scripts your website loads form a supply chain that is very easy to overlook.

What happened

Earlier today, Optimizely issued an incident notice saying that attackers "exploited a vulnerability in Experimentation" and used it to add malicious JavaScript to some customer projects.

Why one service affected so many websites

Web Experimentation lets websites run experiments, such as testing different versions of a web page. Websites using the service load a script from the vendor, known in the industry as a snippet (a small piece of code embedded in the page). Each time it loads, the snippet runs a custom code field called Project JavaScript.

According to Report URI's technical analysis, the attackers wrote a loader (a program that fetches further malicious code) into the Project JavaScript of multiple customer projects, leaving the rest of the snippet untouched. Because the snippet was still delivered from cdn.optimizely.com and carried the vendor's own certificate, every page that loaded the snippet also ran the loader. Some websites host the snippet on their own domain and were affected as well, because the content still comes from the same project.

Scale of the impact

Report URI checked 1,611 Optimizely snippets, most of them found through its own crawl data. It found the code in 188 of them, belonging to 178 organisations. It believes the true figure may be higher, because it could only check snippets it found in time. Besides CNN, BBC and Zoom, affected snippets also belonged to Salesforce, GitLab, IKEA, HSBC, Equifax, Air France-KLM, Ledger and Peacock, among others. Optimizely's own main website and login page also carried the code. Some researchers have named the campaign OPTIMJACK.

On the timeline, the earliest injection appeared in BBC's snippet at 04:21 UTC yesterday. Large-scale clean-up began at around 20:40 UTC, and by 21:52 UTC only TalkTalk's snippet still contained the code. However, Smartsheet's script was cleaned once and then had a hidden version planted again, which Report URI says suggests the attackers still had access at that point.

What the malicious code does

  • Swapping cryptocurrency addresses: The payload (the part that carries out the malicious behaviour) is a file called track.js. It replaces valid wallet addresses found in page text, forms, links, the clipboard and outgoing requests with the attacker's own addresses. According to StepSecurity's analysis, it only replaces addresses that pass validation and sit near words such as wallet, deposit or send. Even copying an address may not be safe, because an address a visitor copies from the page may already be the attacker's by the time it is pasted into a wallet.
  • Stealing card details: A card skimmer (a program that steals payment card data), added at around 13:43 UTC, captures the card number, expiry date and CVV when they are submitted through website form fields, and sends them to the attacker's server. If a website uses hosted fields in cross-origin payment iframes, such as those from Stripe or Adyen, the code cannot read them. Report URI also says it cannot see how many card numbers were exposed.
  • Attack tooling aimed at iOS: On iPhone and iPad, the code loads a second stage, which Report URI describes as an iOS exploit kit and identifies as Coruna and DarkSword, both documented by Google researchers. Coruna targets iOS 13.0 to 17.2.1, and DarkSword targets iOS 18.4 to 18.7. However, there are currently no reports of any iPhone actually being taken over. Researchers at Cynet obtained the second stage using an emulated iPhone browser and described what they saw as conditional delivery only, "not a successful compromise of a physical iPhone or iPad".

Losses and what remains unclear

Report URI says cryptocurrency has already been stolen. As of 19:25 UTC yesterday, the attackers' wallets had received about US$7,040, all within roughly nine hours. StepSecurity estimates the same set of addresses has received about US$6,600 in total, and notes that two of them were already in use before the injection began, so "the chain does not show which transfers came from victims".

Optimizely says it has fixed the vulnerability and removed the code, has secured affected user accounts, and has strengthened protections to stop unauthorised code delivery. However, its notice does not explain how the vulnerability worked, how many projects were modified, when the fix was completed, whether the attackers still have access, or what customers should do. Report URI also admits it is unclear how the attackers obtained write access to so many unrelated customer projects, and says Optimizely needs to explain this.

What this means for Hong Kong businesses

Cynet's researchers point out that a website which delivered the code has not necessarily had its own systems breached. In other words, your servers, passwords and firewall can all be fine, yet visitors can still be harmed if an external script you load has been altered.

The following types of company should pay particular attention:

  • Companies using third-party analytics, A/B testing or marketing tools: These tools usually need to load an external script on your pages, and Optimizely in this incident falls into exactly this category.
  • Companies that take card details directly on their own website: If the form fields are handled by your own site, the card number, expiry date and CVV could be read by a skimmer. Report URI recommends that such sites treat cards entered on Monday as potentially exposed.
  • Companies with customer login or membership systems: If session tokens or other secrets are held in cookies without the HttpOnly flag, they should be treated as exposed.
  • Companies that accept cryptocurrency payments: Customers may be steered into paying to the wrong address.

Beyond the direct losses, there is also brand reputation: visitors will not distinguish where the problem originated. They will only remember that they were compromised on your website.

What businesses should do

  1. Inventory every external script your website loads: Include analytics, experimentation, advertising, customer service and tracking tools, and record who is responsible for each and why it is needed. Include snippets that are delivered from your own domain but whose content comes from a third-party project.
  2. If you use Optimizely, check each project's content: Open the Project JavaScript of every project and the custom code of every experiment, and search for 1688360, atob( or any script you did not write. Searching for atob( can find the version of the loader hidden using base64.
  3. Review who can write to your account, and rotate credentials: Check users, API tokens and integrations, and rotate the relevant credentials. If session tokens or other secrets are held in cookies without HttpOnly, treat them as exposed and replace them as well.
  4. Tighten your Content Security Policy: Deploy strict script-src and connect-src directives. Note that simply allowing cdn.optimizely.com will not help, because the code in this incident was delivered from that very source, and strict-dynamic or unsafe-eval allow the payload to run anyway on some websites.
  5. Check your logs and consider notifying customers: StepSecurity recommends blocking the related indicators and searching logs from 08:00 UTC on Monday. If you confirm that your website delivered the code, Report URI recommends considering notifying customers. Also note that a snippet that looks clean now may still have delivered code on Monday, so do not rely only on its current state.

For colleagues and customers who browsed an affected website on Monday, Report URI recommends updating iPhones and iPads to iOS 18.7.3 or later, or iOS 26.3 or later, verifying addresses for cryptocurrency payments, and watching statements for card payments.

How we can help

Many companies have accumulated a lot of external tools on their websites over the years, yet nobody has a complete picture of what is being loaded right now. Our Website Support & Maintenance service can start with an inventory of your external scripts, check for items of unknown origin or no longer in use, and then help you tighten protections such as your Content Security Policy, so that when a supply chain incident occurs, the impact is smaller and you spot it sooner.

If you are not sure which third-party scripts your website is loading, or would like someone to carry out a check for you, please get in touch with us.

Related serviceWebsite Support & Maintenance

Source: The Hacker News

  • #CyberSecurity
  • #SupplyChainAttack
  • #Optimizely
  • #WebSecurity
  • #ThirdPartyScripts
  • #HongKong