Cloudflare Page Shield's Machine Learning Catches 4 E-commerce Malware Attacks That Slipped Past Static Scanners

Cloudflare's ML system caught 4 unsigned e-commerce JS attacks that slipped past all static scanners.
Cloudflare revealed that its Page Shield ML system identified four malicious JavaScript attacks targeting online stores — including affiliate hijacking, clickless commission theft, a repurposed search hijacker backdoor, and a mobile cloaker. All four lacked known signatures, making them invisible to VirusTotal and URLScan. The core issue: signature-based scanning has an inherent blind spot against first-time threats. Page Shield's ML model detects behavioral anomalies rather than matching known samples, enabling it to catch previously undocumented attacks. The case is a clear warning for e-commerce merchants and developers that static scanning alone is no longer adequate.
Cloudflare recently disclosed that its client-side security machine learning (ML) system successfully identified four malicious JavaScript operations targeting online stores. These attacks share one critical trait — none had known signatures, making them effectively "invisible" to mainstream static scanning tools like VirusTotal and URLScan. This case exposes a long-overlooked blind spot in web security defense: detecting client-side attacks is shifting from "signature matching" to "behavioral recognition."

Four E-commerce Malware Attacks That Were Caught
According to Cloudflare's disclosure, the four malicious campaigns captured by Page Shield's ML module each employed distinct attack techniques, spanning a complete chain of black-market tactics from traffic hijacking to commission theft.
The first was affiliate hijacking. Attackers injected scripts to tamper with affiliate marketing links on e-commerce sites, redirecting commissions that should have gone to legitimate promoters into their own accounts — essentially a parasitic form of traffic and revenue theft.
The second was clickless commission theft. Unlike traditional click-bait tactics, this type of attack requires no user interaction whatsoever to complete commission attribution fraud, making it far more covert. Both users and merchants typically have no idea it's happening.
The third case is particularly notable — a script originally designed as a search hijacker was repurposed and transformed into a storefront backdoor. This demonstrates that attackers are recycling and adapting existing malicious tools to fit new attack scenarios, lowering their development costs.
The fourth was a paid mobile cloaker. These tools use cloaking techniques to serve different content to mobile traffic, evading detection while monetizing the deception.
Cloudflare Page Shield is a client-side security product launched by Cloudflare in 2021. Its core function is to monitor all JavaScript resources loaded on web pages, detecting unauthorized script injections or malicious behavior. Page Shield evolved from a protection module designed to counter Magecart attacks — a type of supply chain attack specifically targeting payment card data theft on e-commerce sites. Magecart-style attacks surged around 2018, with major victims including British Airways and Ticketmaster, spurring the industry's focus on client-side script monitoring. Page Shield collects script behavioral data via Content Security Policy (CSP) reporting mechanisms, then uses ML models to score and alert on anomalous activity. It is one of the few client-side security solutions to directly integrate ML capabilities at the CDN/WAF layer.
Why Static Scanners All Failed at Once
The most sobering aspect of this incident is that these four attacks were "mostly invisible to VirusTotal and URLScan."
Traditional security scanning tools fundamentally rely on signature matching — they maintain a fingerprint database of known malicious samples and identify threats by comparing code against that database. This mechanism is efficient and reliable against known threats, but is helpless when facing new, never-before-documented malicious scripts.
Cloudflare explicitly stated that these four attacks had "no signatures." This means the attackers either deployed these scripts for the first time, or obfuscated known code enough to avoid fingerprint detection. For scanners that rely on static signatures, no signature equals no threat — and this is the structural weakness of the defense framework.
Client-side attacks are especially difficult to deal with because they execute inside the user's browser. Scripts can load dynamically, execute conditionally, and even behave differently for different visitors. This dynamism puts static-snapshot-based scanning at a natural disadvantage.
VirusTotal is Google's multi-engine threat scanning platform, aggregating detection engines from over 70 security vendors. It is widely considered the "gold standard" reference for determining whether a file or URL is malicious. URLScan.io focuses on dynamic rendering and static analysis of web URLs, recording resources loaded, request behavior, and screenshots. Both are widely used in the security research community, but share the same core limitation: they depend on accumulated historical samples. A brand-new malicious script will show as "clean" on both platforms until it has been flagged by at least one engine. This is known in the security field as the "zero-day blind spot" — not a flaw in the tools themselves, but an inherent time-window vulnerability in signature-based architectures when facing first-time threats. For attackers, the goal is simply to complete the attack before the script gets catalogued.
How Machine Learning Fills This Blind Spot
Cloudflare's Page Shield uses a machine learning approach to identify client-side threats — fundamentally different in philosophy from static signature matching.
Rather than asking "does this code match a known malicious sample?", the ML model asks "does this script's behavior look anomalous?" — for example, is it tampering with affiliate links, does it contain covert redirects, or is it presenting different content to different endpoints? By learning from the behavioral patterns of large volumes of both normal and malicious scripts, the model can make judgments about novel attacks it has never seen before.
This "behavior-first" rather than "signature-first" detection paradigm is precisely why it was able to catch all four of these attacks. When an attack lacks comparable signatures, behavioral characteristics become the more reliable basis for identification.
Implications for E-commerce and Developers
For merchants running online stores, this incident is a clear warning: relying solely on traditional scanning tools for security checks is no longer sufficient. Attackers target commission flows and traffic — elements directly tied to revenue — and their methods are becoming increasingly covert (e.g., clickless theft, mobile cloaking), allowing losses to silently accumulate over time.
From a technology trends perspective, client-side security is emerging as a critical battleground in web security. Third-party scripts, supply chain dependencies, and dynamic injection continuously expand the attack surface, while static detection alone cannot cover these dynamic threats. Bringing machine learning into client-side behavioral monitoring represents a meaningful upgrade to defensive capabilities.
For developers, practices worth adopting include: establishing monitoring and allowlisting mechanisms for third-party scripts loaded on pages, paying attention to the integrity of sensitive elements like affiliate links, and adopting security solutions with behavioral analysis capabilities — rather than relying solely on periodic static scans.
Supply Chain Script Attacks are one of the primary sources of client-side threats in e-commerce scenarios. Modern e-commerce websites load dozens of third-party JavaScript files on average, covering ad tracking, payment components, customer service chat, affiliate marketing, and more. Every third-party script is a potential attack entry point — attackers can compromise the script provider's server (rather than attacking the target site directly) and affect every site using that script in one fell swoop. Subresource Integrity (SRI) is one of the most direct defensive measures currently available: adding an integrity attribute with a hash value to <script> tags in HTML allows browsers to verify that script content hasn't been tampered with before loading. Additionally, strict configuration of Content Security Policy (CSP) can restrict which domains are allowed to execute scripts, fundamentally reducing the attack surface. These mechanisms, used in combination with behavioral monitoring solutions, can form a more complete defense-in-depth strategy.
Conclusion
The four cases Cloudflare disclosed, while not dramatic in scale, clearly expose a common problem in current web security: static scanners are often rendered ineffective against new, unsigned client-side attacks. ML-driven behavioral detection offers a viable remediation path. As e-commerce black-market tactics continue to evolve, these kinds of "invisible attacks" are likely to become increasingly prevalent — and defenders need to shift from reactive signature matching toward more proactive behavioral recognition.
Related articles

rag-eval: A Zero-Dependency, No-API-Key RAG Evaluation Tool
rag-eval is a zero-dependency, framework-agnostic open-source RAG pipeline evaluation tool. It supports free local lexical and retrieval metrics with no API keys required, and offers optional LLM Judge for semantic validation. Compatible with Haystack, LangChain, and LlamaIndex.

Vercel AI SDK Releases workflow-harness 1.0.115 Patch Update
Vercel AI SDK releases @ai-sdk/workflow-harness 1.0.115 patch update, syncing the @ai-sdk/harness dependency. Learn about the update, release mechanism, and what it means for developers.

GLM 5.3 Now Available on Serverless Training API — No Sales Process Required
GLM 5.3 is now available on Serverless Training API alongside Kimi K3 and Qwen 3.8 27b. No sales process needed — start fine-tuning directly via docs or pre-made recipes.