Introduction
As Large Language Model (LLM) agents transition from experimental sandboxes to production environments—handling tasks ranging from financial management to database administration—the need for rigorous security evaluation has become paramount. Current evaluation frameworks often rely on simulated "toy" environments that fail to capture the complexities of real-world deployment, such as network latency, authentication hurdles, and state persistence. This "fidelity gap" can lead to a false sense of security, where an agent appears robust in a sandbox but fails when encountering real-world vulnerabilities like SQL injection or malformed API responses.
To address this, we introduce RAS-Eval, a robust benchmark designed to stress-test LLM agents in real-world environments. RAS-Eval supports real tool execution and standardized communication protocols like Anthropic’s Model Context Protocol (MCP), revealing significant vulnerabilities in current state-of-the-art models.
The RAS-Eval Framework
The RAS-Eval framework is built upon three core pillars designed to provide a high-fidelity security assessment:
- Multi-Format Tool Support: Unlike previous benchmarks limited to specific formats, RAS-Eval supports tools implemented in standard JSON, LangGraph, and MCP. This ensures compatibility with modern, standardized agent architectures.
- Dual Execution Modes: The framework offers both Simulated Execution for cost-effective testing and Real Execution using actual APIs and persistent databases. This dual approach captures vulnerabilities, such as those involving API token handling, that only manifest in live environments.
- Granular Failure Taxonomy: Moving beyond binary pass/fail metrics, RAS-Eval defines 32 failure modes categorized into six atomic groups, including Partial Tool Omission, Sequential Violation, and Runtime Execution Faults.
To generate adversarial scenarios, the researchers utilized 58 attack templates mapped to 11 Common Weakness Enumeration (CWE) categories, including Command Injection (CWE-77) and SQL Injection (CWE-89). This structured approach allows researchers to pinpoint exactly why an agent failed—whether due to a logic error or a specific security breach.
Dataset and Benchmark Comparison
The RAS-Eval dataset comprises 80 high-level test cases across seven diverse scenarios: Academic, Schedule, Web Search, OS, Database, Finance, and General. These cases are supported by 75 real tools integrated via 18 distinct toolkits. To ensure a comprehensive stress test, the framework includes 3,802 attack tasks created by permuting adversarial methods across tool invocation sequences.
As shown in the comparison with existing benchmarks like AgentSafetyBench and ToolEmu, RAS-Eval is the only framework providing "Real" scenario authenticity while simultaneously supporting JSON, LangGraph, and MCP. This makes it uniquely suited for evaluating agents built on modern production stacks.
Experimental Results and Insights
Evaluation of six state-of-the-art LLMs revealed a significant performance gap under adversarial pressure. The average Task Completion Rate (TCR) dropped by 36.78% when agents were subjected to attacks. In the "Academic" scenario, the Attack Success Rate (ASR) reached a staggering 85.65%, with an overall average ASR of 73.44% across all scenarios.
Key insights from the evaluation include:
- The Simulation Gap: Real-world execution consistently exposed vulnerabilities related to authentication and network-level errors that simulations missed.
- Dominance of Tool Omission: The most frequent failure mode was "Partial Tool Omission" (75.54% of failures), suggesting that adversarial inputs effectively derail the agent's reasoning chain, causing it to skip necessary steps.
- Scaling Laws in Security: Larger models, such as Qwen-Max, demonstrated superior resilience compared to smaller versions, suggesting that security capabilities may scale with model size.
- MCP Vulnerabilities: While MCP standardizes communication, it also centralizes the attack surface. Poorly implemented servers can introduce logical inconsistencies that agents fail to navigate safely.
Conclusion
RAS-Eval highlights a critical need for improved security measures in LLM agent development. While larger models show promise, the high success rate of CWE-mapped attacks across all tested models indicates that current agents are highly susceptible to adversarial manipulation. Future work will focus on utilizing the RAS-Eval framework to develop and benchmark specific mitigation strategies, such as advanced input sanitization and more robust reasoning architectures.
The code and data for RAS-Eval are open-sourced to encourage further research into agentic security.
Summary updated