AI Briefing
KO

Cloudflare Client-Side Security: Smarter Detection, Now Open to Everyone

·2026.03.30 15:00

Key point

Cloudflare has significantly reduced false positives in client-side malicious JS detection using LLM-assisted judgment.

Details

Cloudflare Client-Side Security Advanced (formerly Page Shield add-on) is now available self-serve, and the free Client-Side Security bundle now includes domain-based threat intelligence at no additional cost.

This feature works using browser reporting, such as CSP signals, so you can start without a separate scanner or app instrumentation, and it doesn't introduce any web application latency. Cloudflare explains that it analyzes 3.5 billion scripts per day, observing an average of 2,200 scripts per enterprise zone.

The core of the detection is looking at what a script actually intends to do. AST (abstract syntax tree)-based analysis catches malicious intent patterns beyond variable renaming, minification, or obfuscation, with a GNN (Graph Neural Network) handling the primary detection.

The problem is that client-side compromise is rare, so a significant portion of detection results end up being false positives. To reduce this, Cloudflare added an LLM as a second-stage judge, structured as follows:

  • First, the GNN evaluates all scripts.
  • If judged benign, it terminates immediately, so most traffic is processed at no additional cost.
  • If potentially malicious, it's passed to Workers AI's open-source LLM (gpt-oss-120b) for re-evaluation at the semantic level.
  • If the final verdict is benign, it overrides the GNN's judgment.

This approach is a cascading classifier combining a high-recall GNN with an LLM strong in semantic understanding. Cloudflare states that while the GNN maintains high recall, the LLM filters out sketchy but harmless obfuscation, significantly lowering false positives.

In an internal production traffic evaluation, based on the JS Integrity threat category, FP on total analyzed traffic dropped from about 0.3% to 0.1%, nearly a 3x improvement. On a unique scripts basis, it dropped from about 1.39% to 0.007%, an improvement of roughly 200x.

All GNN flags are stored in Cloudflare R2 for post-hoc verification, continuously auditing whether the LLM missed any real attacks. Cloudflare states that with this accumulated data, it plans to lower the GNN's threshold more aggressively, aiming to better catch zero-day-type threats that previously fell below the threshold.

A real-world case involved a malicious script called core.js. This code targeted Xiaomi OpenWrt-based routers, querying WAN settings and changing behavior based on values like wanType=dhcp, static, pppoe, attempting to switch DNS to a Chinese public DNS and secretly replace the admin password. Cloudflare explains that although obfuscation was strong, the GNN revealed the structure, and the Workers AI LLM confirmed the intent.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.