AI-Infra-Guard: Layer-Paradigm Matching for Full-Stack AI Agent Red Teaming (arXiv:2606.31227)
Securing the AI Agent: A Unified Framework for Multi-Layer Agent Red Teaming
Paper Claims
What the authors claim to have proven or engineered:
- The attack surface of modern AI agents is stratified across 4 distinct layers (Infrastructure, Protocol/Tools, Agent Behavior, and Model), and no single detection paradigm fits all of them.
- Formulates the Layer-Paradigm Matching Principle: matching deterministic rules to infrastructure, static AST/dynamic auditing to protocols and skills, agentic red teaming to behavior, and attack operators to models.
- Implements AI-Infra-Guard, scanning 75+ open-source AI infrastructure components (Ollama, vLLM, Langflow, Open-WebUI) against 1,400+ deterministic vulnerability rules.
- Provides the first systematic supply-chain auditing engine for Model Context Protocol (MCP) servers and third-party agent skill packages.
Experimental Evidence
What was actually demonstrated with observable metrics:
- Empirical deployment across large-scale open-source and enterprise AI stacks, discovering critical exposures across serving engines and orchestration frameworks.
- Demonstrates that deterministic rule engines eliminate false positives on infrastructure scanning, whereas LLM-as-a-judge approaches suffer from severe non-determinism and hallucinated CVEs.
- Validates protocol-level AST parsing to detect hidden shell invocations, network sockets, and unvetted imports in third-party MCP tool packages prior to runtime execution.
Limitations & Caveats
What is NOT proven, lab-constrained, or assumed:
- Dynamic behavioral red-teaming of multi-agent interactions incurs high compute requirements when executing multi-turn adversarial simulations.
- The 1,400+ infrastructure rules require ongoing community curation to maintain synchronization with newly disclosed CVEs.
- Does not evaluate kernel-level container breakout exploits or GPU driver firmware vulnerabilities.
Hermes Critical Analysis
Objective interpretation deconstructing hype vs reality:
AI-Infra-Guard is the first academic framework that fully validates the architectural doctrine of Hermes Codex: agent security cannot be reduced to prompt engineering. An agent's runtime is anchored in classic software infrastructure (Ollama, vLLM, Langflow) and protocol interfaces (MCP). By matching specific detection paradigms to each stratum, the authors provide the operational blueprint for enterprise AI posture management.
Security Implications
Why enterprise security teams must pay attention:
- Organizations relying solely on LLM guardrails remain completely vulnerable to infrastructure-level CVEs (e.g. Langflow RCE, Ollama API bypass).
- Third-party MCP servers and 'skills' represent an unmonitored software supply chain vulnerability equivalent to unvetted npm or PyPI packages.
- Security assessments must bridge classical application security (SAST/DAST) with semantic agentic red-teaming.
Operational Recommendations
Actionable controls for CISOs, SOC teams, and AI engineers:
- Adopt the 4-layer Layer-Paradigm Matching architecture across enterprise AI DevSecOps pipelines.
- Integrate deterministic CVE scanning for AI serving frameworks (Ollama, Langflow, vLLM) into CI/CD build gates.
- Mandate static AST auditing and capability manifest verification for all Model Context Protocol (MCP) tools before runtime registration.
- Conduct multi-turn behavioral red-teaming targeting agent planning divergence and tool parameter boundaries.
HERMES AGENTIC SECURITY SCORE & RISK: AI-INFRA-GUARD
Target:Full-Stack AI Agent Infrastructure (Serving Engines, MCP Protocol, Skills, Foundation Models) HASS rates full-stack agent infrastructure at 86/100 (CRITICAL). AI-Infra-Guard proves that infrastructure-layer vulnerabilities (Langflow, Ollama) and protocol-layer gaps (MCP) undermine even the most safety-aligned foundation models.
AAP-007: Autonomous Cascading RCEAGENTIC ATTACK_PATTERN
1. Executive Summary & Epistemic Significance
Section titled โ1. Executive Summary & Epistemic SignificanceโThe explosive growth of open-source AI infrastructureโincluding model serving engines (vLLM, Ollama, TGI), low-code agent builders (Langflow, Flowise), user interfaces (Open-WebUI), and the Model Context Protocol (MCP) ecosystemโhas far outpaced the security tooling available to defend it.
Most security teams make one of two critical mistakes:
- The Traditional AppSec Fallacy: Applying classical network scanners that lack awareness of AI-specific components, embeddings, and agentic workflows.
- The Pure AI Alignment Fallacy: Assuming that safety-tuning the foundation model (RLHF, Llama-Guard) protects the application, ignoring that the underlying server or tool is vulnerable to classical Remote Code Execution (RCE).
In โSecuring the AI Agent: A Unified Framework for Multi-Layer Agent Red Teamingโ (arXiv:2606.31227), Yang et al. introduce AI-Infra-Guard and formalize the Layer-Paradigm Matching Principle. Their central thesis is that an AI agent is an interconnected stack of heterogeneous technologies, and no single detection paradigm can secure all layers.
2. The Layer-Paradigm Matching Principle
Section titled โ2. The Layer-Paradigm Matching PrincipleโThe core architectural contribution of AI-Infra-Guard is stratifying agent security across four layers and matching each layer with its mathematically optimal detection paradigm:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ THE 4-LAYER PARADIGM MATCHING ARCHITECTURE โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโคโ Architectural Layer โ Dominant Vulnerabilities โ Optimal Detection Paradigmโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโคโ 4. MODEL LAYER โ Token jailbreaks, safety โ Automated Jailbreak โโ โ alignment bypasses โ Harness (26+ operators) โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโคโ 3. AGENT BEHAVIOR โ Planning drift, goal โ Multi-Turn Black-Box โโ โ shadowing, tool divergenceโ Agentic Red Teaming โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโคโ 2. PROTOCOL & TOOLS โ MCP command injection, โ Static AST Parsing & โโ (Skills & MCP) โ unvetted imports, RCE โ Tool Schema Verification โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโคโ 1. INFRASTRUCTURE โ Exposed APIs, CORS flaws, โ Deterministic Rule Engine โโ (Serving/Hosting)โ SSRF, path traversal โ (75+ targets, 1,400+ rules)โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโWhy Layer-Paradigm Matching is Necessary:
Section titled โWhy Layer-Paradigm Matching is Necessary:โ- Why not use LLMs for Layer 1? Using LLM-as-a-judge to inspect whether an Ollama daemon or Langflow instance is vulnerable introduces hallucinations, non-deterministic flakiness, and high compute cost. A deterministic rule engine matching exact versions and HTTP banners provides 100% precision.
- Why not use Regex for Layer 3? Regular expressions cannot understand multi-step planning or evaluate whether an agentโs
Thought:trace diverges from intended business goals. Semantic agentic red-teaming is strictly required.
3. Auditing the Emerging Frontier: MCP & Agent Skill Supply Chains
Section titled โ3. Auditing the Emerging Frontier: MCP & Agent Skill Supply ChainsโWhile traditional security covers Layer 1 and academic research focuses on Layer 4, AI-Infra-Guard pioneered the first comprehensive security engine for Layer 2: Protocol & Tool Ecosystems.
As demonstrated in recent industry deployments, developers extend agent capabilities by installing third-party skills and connecting to remote Model Context Protocol (MCP) servers. AI-Infra-Guard analyzes this supply chain through:
- Static AST Deconstruction: Scans Python and TypeScript skill packages for undeclared subprocess calls (
os.system,child_process.exec), raw network sockets (socket.connect,fetch), and dynamic code evaluation (eval,Function). - Schema & Intent Discrepancy Auditing: Compares the human-readable description in
tools/listagainst the actual code executed intools/call. If a tool advertised as"convert_currency"contains code accessing$HOME/.ssh, the framework flags a high-confidence supply-chain backdoor. - Execution Sandbox Verification: Tests whether MCP servers run within restricted Linux namespaces or expose unprotected local loopback ports vulnerable to DNS rebinding.
4. Synthesis with Hermes Codex Threat Intelligence & CVEs
Section titled โ4. Synthesis with Hermes Codex Threat Intelligence & CVEsโThe multi-layer vulnerabilities mapped by AI-Infra-Guard directly mirror the critical CVE investigations published on Hermes Codex:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ AI-INFRA-GUARD FINDINGS โโโโบ HERMES CVE INTELLIGENCE โโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโคโ Architectural Stratum โ Hermes CVE / Dossier โ Root Cause Vulnerability โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโคโ Layer 1: Infra (Ollama)โ CVE-2024-28224 โ Daemon API bypass via DNS โโ โ โ rebinding on 127.0.0.1 โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโคโ Layer 1: Infra (Langfl)โ CVE-2024-37014 โ Custom component executionโโ โ CVE-2025-34291 โ CORS / SameSite=None RCE โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโคโ Layer 2: Protocol (MCP)โ CVE-2025-49596 (MCP) โ 0.0.0.0-day local proxy โโ โ CVE-2025-6514 (Remote) โ OS command injection โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโคโ Layer 3: Agentic Plan โ AAP-007 โ Autonomous cascading RCE โโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโ- CVE-2024-28224 (Ollama DNS Rebinding): Layer 1 vulnerability where the local model server fails to validate Host headers.
- CVE-2024-37014 & CVE-2025-34291 (Langflow RCEs): Layer 1 & 2 vulnerabilities where web orchestration engines allow unauthenticated remote code execution.
- CVE-2025-49596 (Anthropic MCP Inspector RCE) & CVE-2025-6514 (
mcp-remoteProxy RCE): Landmark Layer 2 protocol vulnerabilities allowing arbitrary command injection through MCP endpoints.
5. Enterprise Implementation Blueprint
Section titled โ5. Enterprise Implementation BlueprintโTo deploy Layer-Paradigm Matching across corporate AI infrastructure, security teams should align their DevSecOps pipelines with the Hermes AI Agent Security Standard (HASS-1.0):
-
Automated Infrastructure CVE Auditing (Layer 1)
Deploy CI/CD scanners that inspect Dockerfiles and Kubernetes manifests hosting Ollama, vLLM, Langflow, and Triton against deterministic vulnerability databases. -
Pre-Registration MCP Tool Verification (Layer 2)
Implement an admission controller for Model Context Protocol servers. Every MCP server definition must pass static AST inspection before an agent is permitted to register its tools. -
Multi-Turn Behavioral Canary Probing (Layer 3)
Continuously test agent workflows against adversarial goal-shadowing prompts to detect if planning logic deviates under multi-step pressure. -
Forensic Telemetry & Incident Playbooks
Export all agent tool executions, prompt tokens, and system calls to enterprise SIEM platforms, triggering automated response workflows via the Hermes SOAR Playbook Generator.