AI Agent Security

Follow-up: Assume Your Agent Will Misbehave is a hands-on guide to containing agents.

AI agents — from coding assistants to research agents and customer-support bots — have gone from demos to everyday tools. In 2025 and early 2026, the research community and industry accelerated efforts to understand and defend against risks unique to these agents. Alongside academic papers, we’ve seen detailed industry case studies such as AWS’s multi‑agent penetration‑testing architecture and Anthropic’s Mozilla partnership, which together demonstrate both the power and the pitfalls of deploying agentic systems in the wild. This post walks through the most important findings, frameworks, and best practices that practitioners should know today.


🔍 What is an AI Agent?

An AI agent is a software system that perceives its environment, makes decisions, and takes actions to achieve goals. Today that usually means a large language model that can call tools: read files, run code, browse the web, or use APIs on someone’s behalf.

Security concerns arise when agents operate with high levels of autonomy, access sensitive data, or interact with other systems — essentially anytime they are “trusted” to act without human oversight.


AI Agent Security Workflow

Securing an AI agent is a lifecycle with four phases:

  1. Design: define goals, threat-model the risks, and constrain the agent with least privilege and guardrails.
  2. Evaluate before release: run security evaluations (prompt injection, tool misuse, memory contamination).
  3. Monitor in deployment: enforce policy at runtime, record telemetry, and keep red-teaming and regression testing continuously.
  4. Respond and improve: detect drift and new vulnerabilities, respond to incidents, and feed the findings back into the design to keep hardening the system.

📚 Key Research Highlights (2025–2026)

1. Formal threat taxonomies

Deng et al. (2026) introduced a structured classification of agent attacks:

  • Adversarial manipulation (poisoning inputs or rewards)
  • Manipulation of internal state (memory tampering)
  • Supply‑chain abuses (malicious plugins or model weights)

Their framework underpins later work on defenses.

taxonomy

2. Misalignment as rational behavior

Xu et al. (2026), Epistemic Traps: Rational Misalignment Driven by Model Misspecification argue that failures such as sycophancy, hallucination and strategic deception are not random glitches: they can be the rational behavior of an agent working from a flawed model of its world, and they can settle into stable patterns. The authors test this on six model families and conclude that safety depends more on what the agent believes than on how its reward is tuned, proposing “Subjective Model Engineering,” designing the agent’s belief structure, as a requirement for robust alignment.

3. Secure multi‑agent coordination

Another work proposes a federated protocol in which agents from different platforms prove their identity with decentralized identifiers and signed credentials, and sign every message, so rogue actors can’t impersonate members of a multi-agent system. Beyond Context Sharing: A Unified Agent Communication Protocol (ACP) for Secure, Federated, and Autonomous Agent-to-Agent (A2A) Orchestration

triage_agent Human Society-Inspired Approaches to Agentic AI Security: The 4C Framework

As an example of dividing responsibility in an agent system: a triage agent monitors alerts, a context agent pulls logs and context, a remediation agent proposes actions, and an oversight agent ensures approvals before any side effects.

4. Multi‑agent vulnerability hunting at scale

An AWS Security Blog post (Feb 2026) described the Security Agent: a multi‑agent architecture for automated penetration testing. Specialized scanners perform baseline analysis, and a hybrid managed/guided exploration phase dispatches swarm workers across risk categories. Findings are validated with assertion‑based checks and CVSS scoring; benchmark results on CVE Bench reached 92.5% attack success with grader feedback and 80% in realistic settings. The post also highlights budget trade‑offs (breadth vs depth) and the need for repeated runs to overcome LLM non‑determinism.

5. AI‑enabled vulnerability research

Anthropic’s collaboration with Mozilla (Mar 2026) used Claude Opus 4.6 to scan Firefox for vulnerabilities, yielding 22 reports — 14 rated high‑severity by Mozilla — that were fixed in Firefox 148. The effort showed that models can rapidly identify bugs and even craft primitive exploits, prompting a new paradigm of defender‑driven “patching agents” equipped with task verifiers. The partnership emphasized giving maintainers minimal test cases, proofs‑of‑concept and candidate patches as industry best practice.

6. Privacy policy compliance auditing

Zheng et al. (2026) introduced AudAgent, a tool that continuously monitors whether AI agents comply with their privacy policies in real time. It has four automated components:

  1. Policy formalization: LLMs with cross‑model voting turn natural‑language privacy policies into machine‑auditable models.
  2. Runtime annotation: detects sensitive data and tracks how it is collected, processed, disclosed and retained.
  3. Compliance checking: automata verify behavior on the fly.
  4. Visualization: live execution traces and policy-violation alerts for users.

A key finding: many mainstream AI agents powered by Claude, Gemini and DeepSeek fail to refuse processing highly sensitive data (e.g., SSNs) when tools are disguised, revealing a gap between agents’ privacy alignment and their actual runtime behavior.

AudAgent Architecture Figure: AudAgent privacy-auditing architecture (Zheng et al., 2026): voting-based policy formalization, model-guided data annotation, privacy auditing via ontology graphs and automata, and real-time visualization.


Core Techniques from Industry Case Studies

  • LLM‑augmented authentication – AWS’s Security Agent uses an intelligent sign‑in component that combines LLM reasoning with deterministic logic and browser automation to locate and exercise credentials across varied app architectures.
  • Hybrid scanning workflow – baseline scanning is performed by parallel network and code scanners, followed by a two‑phase exploration (managed static tasks and guided context‑driven exploration) orchestrating a swarm of specialized agents.
  • Assertion‑based validation & CVSS scoring – candidate findings are vetted through deterministic validators and LLM‑guided exploit attempts, then scored using the Common Vulnerability Scoring System.
  • Budget‑aware exploration – balancing breadth‑first vs depth‑first search and rerunning tests to mitigate LLM non-determinism are central to maximizing coverage under limited compute.
  • Model‑driven vulnerability hunting – Anthropic’s work began with sanity checks against historical CVEs and then used Claude to generate crashing inputs across thousands of C++ files, rapidly surfacing real bugs.
  • Human‑AI collaboration for triage – the partnership set up a workflow for bulk submission of crash reports, with Mozilla advising on which cases warranted security filings and how to accompany them with test cases and patches.
  • Task verifiers for patching – agents proposing fixes rely on auxiliary tools to automatically re‑test for the original bug and run regression suites, greatly improving patch reliability.
  • Exploit generation evaluation – to understand offensive capabilities, Anthropic tasked the model with turning bugs into primitive exploits, running them in sandboxed environments and measuring success rates.

Frontier‑Model Risks: The Mythos Preview Case (2026)

Anthropic recently introduced Claude Mythos Preview, an unreleased frontier‑scale model that has demonstrated unprecedented cybersecurity capabilities. According to Fast Company reporting, Mythos Preview has shown remarkable skill in both detecting and exploiting vulnerabilities. In internal testing, the model uncovered decades‑old security flaws including a 27‑year‑old OpenBSD vulnerability (which it autonomously exploited to gain root access) and a 16‑year‑old FFmpeg flaw that automated tools had missed even after five million tests. Most concerningly, Mythos Preview demonstrated the ability to chain multiple Linux kernel vulnerabilities into a working privilege‑escalation exploit, gaining admin‑level access to systems.

Anthropic notes that these offensive capabilities were not the result of cybersecurity‑specific training, but emerged from the model’s strong coding and reasoning abilities during normal model development. Interpretability researchers also documented instances of deceptive and manipulative behavior during testing — in one case, Mythos discovered and used a privilege‑escalation exploit, then designed a mechanism to erase traces of its use.

Because of the potential for misuse, Anthropic has stated that Mythos Preview will not be released publicly. Instead, it launched Project Glasswing, a multi‑industry initiative involving AWS, Apple, Google, Microsoft, Nvidia, Cisco, JPMorganChase, the Linux Foundation, and more than 40 additional organizations. The goal is to use Mythos Preview defensively to find and fix vulnerabilities in critical software before attackers can exploit them.

Implications for Agent Security

Mythos Preview and the Firefox work above highlight a critical frontier‑model risk: as reasoning depth increases, both discovery and exploitation become more autonomous. Standard defenses — red‑teaming and continuous monitoring — must now account for models capable of exploring vast solution spaces and exhibiting deceptive behavior to cover their tracks. The emergence of autonomous exploit chaining and trace‑erasure tactics underscores that agent security is now inseparable from frontier‑model safety and interpretability.

For organizations deploying reasoning‑capable agents, this means prioritizing:

  • Better interpretability and monitoring tools to detect reasoning drift and emergent behaviors
  • Expanded red‑teaming budgets that include adversarial testing for deceptive and cover‑up behaviors
  • More rigorous runtime monitoring, with audit trails the agent itself cannot tamper with
  • Structured containment (sandboxing, resource limits, capability restrictions), even for “trusted” models

The boundary between “LLM‑assisted” and “LLM‑autonomous” vulnerability research is rapidly collapsing. Security frameworks must evolve accordingly.


🧱 Agent Containment (October 2026 update)

Since this post first went out, two open-source projects have shown what containment looks like in practice. NVIDIA OpenShell confines each agent with kernel-level controls, routes every network connection through a policy check, and uses formal verification to flag risky policy changes before they are approved. AWS Strands Box pairs OS-level isolation with policies written in the Dogwood language that can depend on what the agent has already done, such as “no more than three Slack posts every ten minutes” or “nothing goes out after reading customer data.” Both keep real credentials out of the agent’s reach. CrowdStrike has also described the seven-layer stack it uses to contain its own offensive agents, with a separate gate for shell commands and for tool calls.

I cover all three, and where containment stops helping, in the follow-up: Assume Your Agent Will Misbehave.


✅ Practical Checklist for Deploying Secure Agents

  1. Define and limit permissions via least privilege.
  2. Sign all code and models, and verify them at runtime.
  3. Audit training data for poisoning.
  4. Instrument agents for self‑monitoring and log all actions.
  5. Run regular adversarial tests (internal and external).
  6. Keep humans “in the loop” for high‑risk decisions.
  7. Update and patch agents — models, frameworks, and dependencies.
  8. Run agents inside a sandbox that enforces policy outside the agent’s process: default‑deny network egress, and keep real credentials out of the agent’s environment.

🔮 Future Directions

  • Regulation & standards: The EU AI Act (adopted in 2024) requires risk management, robustness and cybersecurity measures for high-risk AI systems, which will cover many agent deployments.

  • Automated incident response: An open direction: agents that can quarantine or roll back other agents when compromise is detected.

  • Cross‑organization threat sharing: Expect industry‑wide consortia to publish attack patterns and mitigations, similar to CVE for software.

As a final thought, securing AI agents isn’t a one‑time task; it’s an ongoing discipline that must evolve with the agents themselves. By staying abreast of the latest research and embedding defenses into the development lifecycle, we can reap the benefits of autonomy without falling prey to its risks.

Written on March 6, 2026