
Most enterprises now put a security layer between their users and their LLMs, and most of them cannot say exactly what that layer checks. On 10 November 2026 the USPTO granted Zscaler a patent on one such layer, and the claims tell us more about where LLM defence is heading than the title does.
AG Tech Consulting view: if you are buying or building an LLM security gateway, ask the vendor which attacks it actually stops inline, test it with multi-turn and poisoned-data scenarios of your own, and never let it be the only control between an agent and a real action.
What Zscaler was granted
US 12,794,906 B2, "Vulnerabilities and protections in large language models", is assigned to Zscaler, Inc. The inventors are Chenhui Hu, Weizhen Liu and Miao Zhang. It was filed on 23 October 2024 as application 18/924,682, claims priority to a provisional application of 30 May 2024, and was published as US 2025/0373627 A1 in December 2025.
The patent has 20 claims and two independent ones: claim 1, a method, and claim 12, the same steps stored as instructions on a computer-readable medium. It sits in the network-security class H04L 63, not in a machine-learning class, which says something about how Zscaler sees the problem.
The core idea is easy to state. An intermediate system sits between the user and the LLM, outside the model. It monitors traffic inline, before a query reaches the model, detects an attack, decides what type of attack it is, raises a notification, and applies a defence chosen for that attack type.
What the claims actually cover
Here is the part that matters for anyone reading vendor slides. Claim 1 does not stop at "detect and defend". It ends with a specific requirement: the defence "includes a three-step clustering based defense comprising representation learning, clustering, and filtering."
Claim 11 spells this out. Poisoned and normal samples are projected into an embedded space, a density clustering algorithm separates them, and clusters identified as poisoned are discarded. The description names the tools: UMAP to reduce the representation to a 10-dimensional space, and HDBSCAN for clustering. The filter assumes that poisoned samples are fewer than normal ones, so it keeps the largest clusters and drops the small ones.
Let us be very clear on what kind of defence this is. It is a defence against backdoors and data poisoning in a dataset. The description itself calls it "the cube defense", and the academic CUBE method, a clustering-based defence against poisoned datasets, was published by Cui et al. at NeurIPS 2022.
So the independent claims combine an inline gateway with a training-data hygiene step. The dependent claims then list familiar options: blocking the user input, response-based or prompt-based detection, removing or altering an output, system-mode self-reminder prompts, SmoothLLM and a pretrained language model defence. This article is not legal advice, and anyone building a similar product should read claims 1 and 12 with counsel.
The architecture, and the attack map behind it
The document organises LLM attacks into two families, and that map is useful even if you never read a claim.

The first family is prompt hacking: prompt injection and jailbreaking. The patent names injection styles such as Talking-CIA and Writing-CIA, and the well-known "Do Anything Now" jailbreak. The second family is adversarial attacks on the model's learning: backdoors and data poisoning, with named examples such as BadNet, AddSent, SynBkr, StyleBkd and the clean-label ProAttack.
For each family it lists defences. Against injection: paraphrasing, re-tokenization, data prompt isolation and perplexity-based detection. Against jailbreaks: self-reminder prompts and SmoothLLM, which, per its authors, perturbs multiple copies of a prompt and aggregates the outputs. Against backdoors: ONION, which scores each word by how much removing it lowers sentence perplexity, plus masking-differential prompting and the clustering defence above.
One small drafting slip stands out. The text describes ONION as "a multi-layered security strategy used in networking and cybersecurity", mixing the onion-layer metaphor with the ONION algorithm, and only then describes outlier-word detection, which is what ONION actually does. It is minor, but it shows a networking vocabulary being stretched over NLP research.
The placement is the strongest idea in the patent. FIG. 1 puts the server between the user and the Internet as a proxy or a gateway, and the claims require the system to operate outside the LLM. That means the control does not depend on the model vendor, and it can be applied to many models at once.
The best numbers are not in the claims
The most interesting technical section is the multi-turn jailbreak defence, and it is not required by any claim.
The idea is sound. Single-turn filters judge each prompt alone, while real jailbreaks often escalate over several turns. The Crescendo paper by Russinovich, Salem and Eldan showed exactly this: start with a harmless question, then build on the model's own replies until it crosses the line.
Zscaler's answer is a few-shot conversation classifier. A structured prompt gives an LLM a role, an unsafe-content taxonomy, a handful of labelled examples, the whole conversation and an output format. If the full conversation is judged unsafe, the original model response is replaced with a predefined refusal. No fine-tuning is needed.
The reported results are striking. The inventors built 500 conversations, 250 safe and 250 unsafe, and split them 40 for training and 460 for testing. On the unsafe class, Llama Guard 2 scored between 0.57 and 0.63 across the shot settings, and Llama Guard 3 between 0.64 and 0.67. GPT-4o, used as the few-shot classifier, scored 0.93 to 0.97 on unsafe conversations, with F1 up to about 0.96.
Read these numbers carefully. The test set is small, it was drawn from a dataset "similar to Anthropic, 2022", and the patent itself suggests Llama Guard's weaker unsafe scores may reflect its fine-tuning on internal safety datasets. The point is simple: these are useful signals from the patent's own experiment, not a benchmark you can quote to your board.
Future security risks
The guard becomes the target. A few-shot LLM classifier reads every word the attacker sends. Prompt injection aimed at the classifier, not the main model, is the obvious next step: text written to look like one of its safe examples, or to argue with its taxonomy.
Refusal after the fact is too late for agents. Replacing a response with a refusal works for chat. When the model has already called a tool, sent an email or changed a record, swapping the text afterwards undoes nothing. Gateways built for chatbots will be put in front of agents, and the gap will show.
Poisoning moves to where the clustering cannot see. The clustering filter assumes poisoned samples are the minority and form small clusters. Clean-label attacks such as ProAttack, and slow poisoning of RAG stores and fine-tuning sets, are designed not to stand out. Attackers will spread their samples so they look like the majority.
The gateway becomes a data store. A multi-turn defence needs full conversation history, and the reported best classifier is a third-party hosted model. Every prompt, including personal and confidential data, now passes through one more system and possibly one more provider. Under India's DPDP Act and similar laws, that layer needs the same governance as the LLM itself.
Checklist before you deploy an LLM security gateway
Ask the vendor to list which attack types it blocks inline, which it only logs, and which it handles offline on training data. Test the gateway with multi-turn escalation scripts, not only single malicious prompts. Run prompt-injection tests aimed at the gateway's own classifier, including text that imitates its safe examples. Keep unsafe-content taxonomies and few-shot examples under change control, with an owner and a review log. For agents, enforce tool permissions and human approval before the action, not after the response. Scan fine-tuning sets and RAG sources for poisoning before ingestion, and do not rely on outlier clustering alone. Measure false positives on your own real traffic before switching from monitor mode to block mode. Map where conversation history is stored and which external model sees it, and cover it in your DPDP and privacy assessments. Log every detection, attack type, defence applied and final response, so incidents can be reconstructed. Have counsel review US 12,794,906 B2 claims 1 and 12 if you build or sell an inline LLM defence with clustering-based filtering.
The bottom line
Zscaler's patent puts LLM defence where network security teams already work: in the path, outside the model, vendor-neutral. That is the right instinct. But the granted claims hinge on a dataset-cleaning step, while the most convincing ideas in the document, multi-turn classification and conversation-level refusal, sit unclaimed in the description.
This is the need of the hour: treat the gateway as one layer, test it the way an attacker would, and keep the real permission boundary around what your AI is allowed to do.
Mentioned in this analysis: Zscaler , Jay Chaudhry , USPTO , OWASP GenAI Security Project , OWASP® Foundation , Meta , AI at Meta , OpenAI , Microsoft , Microsoft Security , Mark Russinovich , Anthropic , Hugging Face , National Institute of Standards and Technology (NIST) , Cloud Security Alliance , Data Security Council of India , Ministry of Electronics and Information Technology , Cybersecurity and Infrastructure Security Agency
Sources
https://image-ppubs.uspto.gov/dirsearch-public/print/downloadPdf/12794906 https://patentsgazette.uspto.gov/week45/OG/html/1552-2/US12794906-20261110.html https://thepatentplace.com/iplibrary/patent-grant/12794906/ https://arxiv.org/abs/2206.08514 https://arxiv.org/abs/2011.10369 https://arxiv.org/abs/2310.03684 https://arxiv.org/abs/2404.01833 https://arxiv.org/abs/2312.06674 https://genai.owasp.org/llmrisk/llm01-prompt-injection/ https://genai.owasp.org/llmrisk/llm042025-data-and-model-poisoning/
Also on our website: https://agtechconsulting.ai/insights/zscaler-patent-llm-security-gateway.html
Putting an LLM firewall or AI gateway in front of your models or agents and want an independent review of what it really stops? Email avinash@agtechconsulting.ai, visit agtechconsulting.ai, or book a 30-minute call: https://calendly.com/avinash-dubey-30-min-catchup/meeting-with-ag-tech
Originally published on LinkedIn in the Your CTO Advisor newsletter: read and comment on LinkedIn →


