The Cognitive Firewall:Securing Browser Based AI Agents Against Indirect Prompt Injection Via Hybrid Edge Cloud Defense
Organizations: eBay Inc
Abstract
Deploying large language models (LLMs) as autonomous browser agents exposes a significant attack surface in the form of Indirect Prompt Injection (IPI). Cloud-based defenses can provide strong semantic analysis, but they introduce latency and raise privacy concerns. We present the Cognitive Firewall, a three-stage split-compute architecture that distributes security checks across the client and the cloud. The system consists of a local visual Sentinel, a cloud-based Deep Planner, and a deterministic Guard that enforces execution-time policies. Across 1,000 adversarial samples, edge-only defenses fail to detect 86.9% of semantic attacks. In contrast, the full hybrid architecture reduces the overall attack success rate (ASR) to below 1% (0.88% under static evaluation and 0.67% under adaptive evaluation), while maintaining deterministic constraints on side-effecting actions. By filtering presentation-layer attacks locally, the system avoids unnecessary cloud inference and achieves an approximately 17,000x latency advantage over cloud-only baselines. These results indicate that deterministic enforcement at the execution boundary can complement probabilistic language models, and that split-compute provides a practical foundation for securing interactive LLM agents.
Figures & tables
| Defense Layer | Primary Role | Target Vector | Avg Latency (ms) | Intercept Count |
| (Mean SD) | (% of Total) | |||
| Layer 1: Edge Sentinel | Visual Heuristic (Fail-Fast) | Presentation Attacks | 89 (13.1%) | |
| Layer 2: Cloud Planner | Semantic Reasoning | Jailbreaks & Logic Traps | 323 (47.6%) | |
| Layer 3: Edge Guard | Policy Enforcement | Goal Hijacking & Exfiltration | 259 (38.2%) | |
| Residual (Failures) | N/A | Advanced Evasion | N/A | 6 (0.88%) |
| System Aggregate | Hybrid Edge-Cloud Defense | All Attack Vectors | 517 ms (Avg) | 99.1% Intercepted |
| Configuration | Enabled Layers | ASR | Latency | Defense Logic |
|---|---|---|---|---|
| Baseline | None | 100.0% | N/A | No filtering (Unsafe) |
| Edge Only | Layer 1 | 86.9% | 0.06 ms | Fast but misses semantic |
| Edge + Cloud | Layer 1 + 2 | 39.2% | 288 ms | Misses hijacking |
| Full Hybrid | L1 + L2 + L3 | 0.88% | 517 ms | Defense in depth |
| Attack Scenario | L1 (%) | L2 (%) | L3 (%) | Success (%) |
|---|---|---|---|---|
| Fragmentation | 0.0 | 93.0 | 7.0 | 0.0 |
| Benign Wrapping | 0.0 | 39.0 | 59.0 | 2.0 |
| Allowed-Origin Exfil | 0.0 | 91.0 | 9.0 | 0.0 |
| Static Baseline | 13.1 | 47.6 | 38.2 | 0.88 |
| : Layer compensated for bypass; : Layer bypassed. | ||||