Toward Securing AI Agents Like Operating Systems

Lukas Pirch, Micha Horlboge, Patrick Großmann, Syeda Mahnur Asif, Klim Kireev, Thorsten Holz, Konrad RieckarXiv 2026

TL;DR

This paper introduces a powerful structural analogy between LLM-based AI agents and traditional operating systems to address the massive security risks of autonomous systems. By treating the LLM as an untrusted user process and the agent runtime as the operating system kernel, the authors systematically expose critical vulnerabilities in popular open-source agent frameworks and demonstrate how classic OS security principles can mitigate them.

What Problem Does This Paper Address?

Autonomous AI agents are rapidly evolving from simple chatbots into general-purpose systems that can execute complex tasks by interacting with local files, running shell commands, and accessing third-party APIs. However, giving an LLM unconstrained capabilities alongside sensitive user data introduces severe security risks, such as prompt injection and malicious third-party plugins.

Current security approaches often rely on making the LLM behave correctly via prompt guardrails, which is notoriously fragile. The authors address the lack of a principled, system-level framework to isolate resources, separate privileges, and mediate communication securely within AI agent architectures.

Methods

The authors propose an architectural analogy mapping AI agent components directly to classic OS concepts: the LLM acts as the untrusted User, the agent runtime acts as the Kernel, and tools act as System Calls.

Fig. 2. Comparison of AI agent and operating system stack.

They derive a unified architecture for extensible agents and map nine classic OS security mechanisms (such as sandboxing, process isolation, and data execution prevention) to their agentic counterparts.

To validate this framework, they built a rigorous evaluation environment using extended Berkeley Packet Filter (eBPF) to monitor low-level system events (like file writes and network packets) and employed a virtual machine roll-back strategy for reproducible testing. They evaluated 16 distinct attack scenarios across four open-source agent design philosophies: Vanilla (OpenClaw), Security-focused (IronClaw), Minimalistic (Nanobot), and Wrapper (NemoClaw), using multiple backbone LLMs (Qwen3.5, Gemini-2.5, and GPT-5.5).

Datasets

The paper does not use traditional machine learning training datasets. Instead, it evaluates agent runtimes using a custom suite of 16 realistic attack scenarios (detailed in Appendix B) targeting different security boundaries, including hardware interfaces, process isolation, sandboxing, network filtering, and system logging.

Key Insights and Ideas

  • The LLM is the User, Not the Kernel: The core conceptual shift is treating the LLM as a completely untrusted user process that can be easily manipulated. Security policies must be enforced by the runtime outside the LLM's context window.
  • Shared Context Violates Process Isolation: Current agents feed both trusted system instructions and untrusted user/web data into a single shared LLM context window. This is equivalent to running multiple untrusted programs in the same memory space, leading to inevitable cross-contamination and prompt injection vulnerabilities.
  • Fragmented Security Implementations: Security features are currently implemented haphazardly across open-source frameworks. Simply consolidating existing techniques (like IronClaw's sandboxing and NemoClaw's network filtering) into a single runtime would drastically improve agent security without requiring entirely novel research.

Key Results

  • Universal Vulnerability: None of the four evaluated agents successfully defended against all attacks. Every single agent was susceptible to at least one high-severity vulnerability, such as unauthorized access to session logs or write access to the agent core.
  • Vanilla Failure: OpenClaw (the vanilla baseline) was vulnerable to every single attack scenario tested, despite its popularity and basic security claims.
  • Common Blindspots: Two major weaknesses stood out across all agents: cross-user data exfiltration due to a total lack of session isolation, and unauthorized message sending.
Security mechanism implementation matrix
  • LLM Choice Doesn't Fix Architecture: Replicating the attacks with more advanced models (Gemini-2.5-pro, GPT-5.5) showed that while highly capable models occasionally refuse malicious requests, they can still be bypassed with basic prompt injections. Robust security must be architectural, not model-dependent.

Limitations and Future Work

The authors note several limitations: they evaluated agents primarily using default configurations (though security-conscious users might harden them, defaults should be secure out-of-the-box); they restricted each agent to a single messaging channel; and their attack suite is not completely exhaustive.

Future work points toward developing true context isolation (analogous to virtual memory for tool calls), implementing fine-grained permission models, and establishing tamper-resistant, append-only logging systems specifically tailored for agent runtimes.

Summary updated

BibTeX
@misc{pirch2026toward,
  author = {Lukas Pirch and Micha Horlboge and Patrick Großmann and Syeda Mahnur Asif and Klim Kireev and Thorsten Holz and Konrad Rieck},
  title = {{Toward Securing AI Agents Like Operating Systems}},
  year = {2026},
  eprint = {2605.14932},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.14932},
}
Figure