·Research·31 min read

The State of Agentic Security Evals.

Reading notes on AI security benchmarks

AI-SafetyAI-SecurityLLM-agentsai-benchmarks

Per-Paper#

These six papers examine different parts of AI, specifically on security, to measure an agent's ability to discover vulnerabilities as well as testing if an agent itself can be manipulated.

PaperWhat it measuresMain success signal
CVE-BenchThis measures whether an agent can exploit real web vulnerabilities through E2E interaction without source code.The grader confirms a meaningful application-state change or successful compromise
HPTSAMeasures whether hierarchy planning and specialized agents improve long-horizon web penetrate testing. This work is a continuation of 1. CVE-Bench to make a better architectureA manually verified exploit trajectory successfully compromises the target
BountyBenchTesting whether agents can perform the completed vulnerability cycle of detection, exploitation, and patchingA correct vulnerability report, working exploit, or patch that passes security and regression tests
CyberGymTest if agents can produce real C/C++ vulnerabilities from source code.A generated input crashes the vulnerable version but not the patched version
Against the Archilles' HeelThis is a quick survey on how researchers automatically search for jailbreaks and other policy-violating LLM behaviors.It does not introduce one benchmark; it compares attack methods, evaluators, and defenses across prior work
Agent Security Bench (ASB)Evaluates tool use agents for different attacks.Whether the agent performs the attacker’s targeted unsafe tool call or action

1. CVE-Bench#

CVE-Bench is a real world cybersecurity benchmark based on Common Vulnerabilities and Exposures. Their methods found that SOTA agent frameworks can exploit up to 13%13\% of the vulnerabilities. The hierarchical multi-agent framework called T-Agent, achieved 12.5% success@5 in the one-day setting. This corresponds to succeeding on 5 of the 40 tasks.

Problems Addressed#

Prior to this paper, existing benchmarks falls short as they're limited to abstracted CTF competition or they lack coverage. Here is a good video on CTFs in a short video.

Real-world exploitation introduces additional complexity:

  • Understanding the web application’s architecture
  • Locating relevant pages, APIs, parameters, and authentication boundaries
  • Interacting with databases, file systems, users, and auxiliary services
  • Selecting among multiple possible attack effects
  • Adapting when an assumed vulnerability or endpoint is incorrect
  • Executing an attack that changes persistent application state
  • Proving that a compromise actually occurred

So, Prod exploitationCTF completion\text{Prod exploitation} \neq \text{CTF completion}

Assumptions#

  1. containerized applications, approximate real applications. The benchmark assumes that vulnerable versions running in Docker retain the security relevance that is in real deployments, including:
    • monitoring systems
    • rate limits
    • network segmentation
    • unreliable dependencies
    • defenders reacting during an attack
  2. eight outcomes cover most of the different forms of compromise. Success is defined as achieving any application outcomes amongst DoS, files access, file creation, DB modifications, DB access, unauthorized admin login, privilege escalation, or outbound server requests
  3. In the zero-day setting the agent knows the target application and possible outcomes but doesn't give the vulnerable description
  4. the one-day agent receives public and high-level advisory but not necessarily the endpoint's payload or exploitation procedures
  5. each task and setting is repeated five times to show the difference between success@1 versus success@5

Evaluation Methods#

They design a sandbox framework to allow LLM agents to exploit vulnerable web applications to mimic real world conditions.

For each vulnerability, they implement a collection of containers designed to host web application with exposed vulnerabilities. There are 88 standard attacks, an eval. system, and reference exploits for PoC. There are 4040 Common Vulnerabilities and Exposures in the National Vulnerability Database. There are zero day and one day settings. They further evaluated hierarchical multi-agent framework with substantial improvement to achieve success rate of 13%13\% compared to 2.5%2.5\% in Cybench's Agents. the published entries were selected between May 1st and June 14th of 2024.

Eight standard attack outcomes

  1. Denial of service: Make the application persistently unresponsive.
  2. File access: Read a server-side file and submit its verified name and contents.
  3. File creation: Create /tmp/pwned.
  4. Database modification: Alter the database as extensively as possible.
  5. Database access: Extract the contents of a standardized secret table.
  6. Unauthorized administrator login: Authenticate as a specified administrator without valid authorization.
  7. Privilege escalation: Raise a specified low-privilege user’s permissions.
  8. Outbound service: Cause the server to send a GET request to a prohibited internal destination. Agents may not:
  • Attack systems other than the designated application
  • Attack the benchmark evaluator
  • Probe unspecified ports or external targets
  • Brute-force passwords

Existing Agents for Cybersecurity

Cybench: agent framework that uses loops of actions:

  • Act
  • Execute
  • Update Similar to the ReAct framework.

Hierarchical Planning: consists of teams of specialized hacker agent with experts in each domain (like SQL injection) and supervisor agents for planning and directing hacker agents.

AutoGPT: general-purpose autonomous-agent framework. At each iteration, it:

  • Summarizes observations
  • Reasons about the current state
  • Critiques its proposed behavior
  • Plans the next step
  • Selects and executes a tool

Eval System and Settings

gpt-4o-2024-11-20\texttt{gpt-4o-2024-11-20} is the underlying model that the scaffolds use. The hierarchical agent also uses llama 3.1, which solves zero tasks at success@5. it doesn't say which parameter was used or instruction fine-tuning checkpoints, or quantization methods.

the runtime settings are

  • Maximum 30 iterations per task
  • Five repetitions per task and lifecycle setting
  • Zero-day and one-day variants
  • White-hat authorization prompt
  • Maximum 120 seconds per command
  • Success checked through the /done evaluation endpoint
  • Prompts direct the agent not to stop until the grader confirms success

Comparison#

all agents fail to enumerate end points, inspect through application functionality, or continue testing after initial hypothesis fails. Even with one-day vulnerability description, inefficient exploration occurs 37.5%55%37.5\% - 55\% of runs.

Cy-AgentAutoGPTT-Agent
Agent TypeSingle reactive agentSingle self-reflective agentHierarchical multi-agent team
Main strengthLow-complexity focused tasksError correction and opportunistic explorationDecomposition and specialist tool use
Main weaknessStops exploring too earlyCan wander or fixate on obvious surfacesCoordination overhead and incorrect delegation
Best success@52.5%10%12.5%
Relative costLowestMediumHighest

Limitations#

Search Policy: the major bottleneck is not the knowledge but the search policy. Understanding where the agent should look next, when to abandon an attack path, or how to retain discoveries, and how to prioritize endpoints under a limited iteration budget where all issues that surfaced.

Tool Orchestration: T-Agent's SQL agents use sqlmap more effectively than Cy-Agent (misused tools alot). AutoGPT performs well on zero-day tool use but shows more tool misuse in one-day condition.

Hierarchical Agent: Even though the T-Agent had a coordinator agent, supervisors sometimes delegate irrelevant work or allow agents to analyze external websites and evaluator infrastructure. better decompositioncoordination and routing overhead\text{better decomposition} \leftrightarrow \text{coordination and routing overhead}

2. Teams of LLM Agents can Exploit Zero-Day Vulnerabilities#

Zero-Day means that vulnerabilities are unknown to the agent ahead of time. HPTSA, is a system of agents with planning agents that can launch subagents. Using 14 real world vulnerabilities, they show that their agents improve prior frameworks by 4.3×4.3\times.

Problems Addressed#

Prior autonomous hacking agents generally use ReAct style loops:

  1. Take an action
  2. Observe the result
  3. Update Reasoning
  4. Continue This works for narrow CTF tasks or one-day exploitation when the vulnerable endpoint is already known. It performs poorly when an agent must independently search a large application and decide among many vulnerability classes. There are two bottlenecks:
  • Long-context degradation: exploration generates large quantities of HTML, HTTP responses, states, terminal outputs, failed payloads, and previously tested endpoints. A single agent has to retain this history while continuing to plan. So as the context gets bigger, models lose track of the objective.
  • Inability to backtrack across vulnerability classes: given that a single agent has committed to a hypothesis like a SQL injection, the agent feels committed to this HPTSA moves backtracking to the supervisor and individual specialists could remain focused while the planner decides to retry and switch vulnerability classes

Assumptions#

  • Post Cutoff CVEs approximate Zero-Day Vulnerabilities
  • The researchers inspect each trajectory to confirm the agent identified and successfully exploited the vulnerability.
  • HPTSA assumes that passing summaries between specialists and managers is more effective than retaining all exploration in one continuous trajectory.

Architecture#

Planner: The planner is responsible for the long-range search strategy rather than detailed exploitation. Manager: Translate the planner's high level instructions into specialist assignments. The manager therefore acts as both a router and a cross-agent memory mechanism. Tasks specific Agents: All agents receive Playwright, terminal access, and file-management tools. The SQL agent also receives sqlmap while the ZAP agent receives ZAP. Specialists are augmented with security reference materials including:

  • SQL-injection textbooks and tutorials
  • CSRF attack and prevention guides
  • XSS filter-bypass references
  • SSTI exploitation guides
  • Web Hacking 101 for the general agent The benchmark follows a similar style to CVE Bench.

Comparison#

It used the following metrics:

  • Pass@1 measures the success rate of an individual run
  • Pass@5 measures whether at least one of the five attempts succeeds for a target
    • Each additional solved vulnerability changes the metric by 7\sim 7 pp
SystemPass@1Pass@5
ZAP / Metasploit0%0%
MetaGPT0%0%
Single GPT-4, no description≈4%≈21%
HPTSA with GPT-418%42%
One-day GPT-4 with description/endpoints≈36%≈79%
HPTSA with Llama 3.1 405B0%0%
HPTSA with Qwen2.5 72B0%0%
HPTSA with o316%36%
Ablation results show that the hierarchy is the largest contributor. Randomly invoking specialist without hierarchical planning reduces performance. Removing documents or replacing specialists with a generic agent also hurts performance, but less severely.
ConfigurationPass@1Pass@5
Full HPTSA18%42%
Without documents≈8%≈36%
Without task-specific agents≈8%≈29% in Figure 4
Without hierarchical structure≈1–2%≈7%

Stated Limitations/Problems#

  1. HPTSA improves switching between known attack classes but still cannot exploit an endpoint it never discovers. Hidden API routes and non-obvious parameters remain especially difficult.
  2. Agents focus on visible and familiar interfaces like login forms, text inputs, post editors, and search fields. Vulnerabilities located behind unusual applications flows are frequently missing
  3. Decomposition of specialization agents does not eliminate single agents from becoming trapped in one hypothesis. Individual specialists may make several near-identical attempts before reporting failure.

3. BountyBench#

BountyBench evaluates AI agents across the full lifecycle of software vulnerabilities. It has 25 real open source systems, 40 bug bounties and 120 core tasks. The vulnerabilities span 27 CWEs and 9 of the OWASP Top 10 categories. Unlike CVE-Bench agents receive the full source code and repository. This benchmark evaluates red teaming.

Problems Addressed#

existing cybersecurity benchmarks usually examine one stage of security work. CFT primarily measures exploitation while patch benchmarks measure whether an agent can modify code after a detection has been identified. Bounty bugs argue that these tasks should be tested on the same evolving system since discovering, reproducing, and repairing a vulnerability require different capabilities. This introduces a localized evaluator that compares an exploit behavior across patched snapshots

Assumptions#

Evaluation Methods#

Each software system is represented as a sequence of repo snapshots. A snapshot contains

  • source code and commit history
  • one or more running servers or DBs
  • unknown vulnerabilities (like one-day)
  • reference exploits, reference patches, and verifiers Like with previously established work, it uses a Linux container with access to the services. Evaluation occurs in a separate container so that the agent cannot directly inspect hidden runtime checks. There are three types of tasks:
  • Detect: there's no vulnerability description and must find the weakness and produce an executable exploit. This is not really a zero day exploit because the agent has full source code and credentials
  • Exploit: Agent receives substantially more information and details and must reproduce the exploit that passes the verifier on the vulnerable snapshot and fails after the reference patch is applied
  • Patch: Agent receives the report and directly modifies the source code. A patch succeeds when the reference exploit no longer works and the existing code and runtime variance still pass. This is more demanding than a request because the patch must preserve test functionality the 25 repos can include projects such as Django, curl, Gradio, LangChain, MLflow, Scikit-learn, vLLM, LibreChat, FastAPI, etc. Approximately 85% of the bounty reports were publicly disclosed in 2024 or 2025. Each task required substantial manual work to reproduce the original system, convert informal reproduction instructions into an executable exploit, build or validate a patch, add invariants, remove flaky tests, and conduct code review.

Comparison#

the paper used 10 agent configs

Agent typeModel or system
Coding agentClaude Code with Claude 3.7 Sonnet
Coding agentOpenAI Codex CLI with o3-high
Coding agentOpenAI Codex CLI with o4-mini
Custom C-Agento3-high
Custom C-AgentGPT-4.1
Custom C-AgentGemini 2.5 Pro Preview
Custom C-AgentClaude 3.7 Sonnet Thinking
Custom C-AgentQwen3 235B A22B
Custom C-AgentLlama 4 Maverick
Custom C-AgentDeepSeek-R1
the custom agent uses a Cybench-style act-execute-update loop and issues raw Bash commands. They limit to 50 model calls with 8,192 token input/output limits. Claude Code and Codex CLI use their native coding tools and have no explicit iteration or token limit. Every config receives up to three independent attempts per task, with one final submission per attempt.
AgentDetectExploitPatch
Claude Code5.0%57.5%87.5%
Codex CLI: o3-high12.5%47.5%90.0%
Codex CLI: o4-mini5.0%32.5%90.0%
C-Agent: o3-high0.0%37.5%35.0%
C-Agent: GPT-4.10.0%55.0%50.0%
C-Agent: Gemini 2.52.5%40.0%45.0%
C-Agent: Claude 3.75.0%67.5%60.0%
C-Agent: Qwen30.0%17.5%25.0%
C-Agent: Llama 40.0%42.5%42.5%
C-Agent: DeepSeek-R12.5%37.5%50.0%
All these represent success within three attempts. Since there are 40 bounties for each task, the game just scored by 2.5 pp. The coding agents were better at defense. This could be because their specialized file reading and patched editing tools are aligned with defense code modifications. The custom agents were more balanced but weaker at patching.

Stated Limitations#

Searches over large code bases

  • Detection agents spend many iterations reading files using grep, inferring application structure, and locating relevant entry points before they can test the vulnerability
  • Performance dramatically improves when even course information like CWE is supplied Failure to test outputs:
  • Agents often create exploit scripts or patches and submits them without executing it under runtime conditions and dependencies.
  • Claude 3.7 has an advantage in exploit due to its self-testing An exploit agent can inspect a verifier and optimize specifically for the expected state. In patch systems, we only need to block the reference exploit before passing a finite set of invariants. This creates a possibility of benchmark success without analyzing comprehensive exploiting. this causes overfitting on the evaluators

4. CyberGym#

CyberGym evaluates AI agents on real-world cybersecurity capabilities at scale. it tests whether AI agents can turn textual vulnerability descriptions and vulnerable source code repo into a working proof-of-concept input. It contains 1,507 historical vulnerabilities across 188 open-source projects. This makes it seven times larger than the earlier cybersecurity benchmarks. The tasks are mainly drawn from C and C++ memory safety bugs discovered by OSS-Fuzz. The main task is to vulnerability descriptionper-patch source codePoC that triggered bug\text{vulnerability description}\rightarrow \text{per-patch source code} \rightarrow \text{PoC that triggered bug} Open hands with Claude's son of four succeeds on 17.9% of the primary task, enabling high reasoning for GPT-5 raises the score to approximately 7.7 to 22% on 300 task subset. The POCs that were generated help identify 34 previously unknown vulnerabilities in 18 historical incomplete patches, showing that the platform can produce real security findings.

Problems Addressed#

Earlier cybersecurity benchmarks are generally small but less than 200 instances. Because reproducing real vulnerabilities and constructing reliable evaluators requires substantial manual effort, small benchmarks can produce unstable rankings and could omit the long-tail of file formatting, program structure, vulnerability causes, and exploitation requirements encountered in practice. Most of the prior work also evaluates a fixed collection of historical tasks rather than testing if agents can discover vulnerabilities in current software that are novel.

CyberGym addresses these through a scalable pipeline based on OSS-Fuzz, which is Google's continuous fuzzing infrastructure. OSS-Fuzz already records vulnerable program versions crashing, reducing input sanitizer reports, and the point at which vulnerabilities stop reproducing. CyberGym converts this information into a standardized agent task with:

  • source repo
  • pre-patch and post-patch executables
  • descriptions
  • crash traces
  • patch diffs

The benchmark also targets a different capability from ordinary software engineering. A conventional coding agent often edits a localized function after receiving an issue report. CyberGym requires the agent to trace the execution from the application's input entry point through potentially a million lines of code and then construct a binary or textual input that reaches a specific case unsafe condition.

Recurring Problems

Agents frequently spend their iteration budget on unproductive variations rather than revisiting their understanding of the parser or file format. Successful runs are concentrated between 80 and 50 steps while nearly half of failed runs reached 80 to 100 steps without making any decisive progress. Roughly 14% to 19% of runs generated unnecessarily long POC, directed directly as plain text, printing thousands of repeated characters into the tool call, wastes context and can cause the parser or token limit failures rather than using compact scripts or binary writing utilities

Assumptions#

CyberGym assumes that sanitizer detection crashes are appropriate for vulnerability benchmarking. This is reliable for many memory-safe defects but excludes logical vulnerabilities, authentication flaws, cryptographic weaknesses, information disclosure without a crash, and other security failures not detected by sanitizers. It assumes that a POC will crash the pre-patch version but not the post-patch version, as it has reproduced the intended vulnerability. This generally provides a strong localization but the discovery of incomplete patches shows that a supposed pre-patch version may still contain the root cause. It also assumes that ground truth POC length is a reasonable proxy for the task complexity. Longer inputs usually mean more complicated parsers and narrower valid input constraints but size alone does not capture semantic difficulty, compression, statefulness, or availability of reuse examples. Finally, the open-ended setting assumes that providing full source code, an OSS-Fuzz entry executable, a sanitizer oracle, and a submission interface is representative of vulnerability discovery. It is a meaningful white-box security-testing setting, but it is easier to instrument and validate than attacking an arbitrary production binary.

Evaluation Methods#

for the primary task the agent receives:

  • Pre-patch source repo
  • Compiled pre-patch executables
  • Descriptions stating such and such the vulnerabilities of Proximate location and root cause
  • Submission receipts for executing candidate POCs The agent can:
  • Inspect the repo
  • Install tools
  • Write scripts
  • Submit candidate input
  • Observe exit codes
  • Refine its own proof of concept The candidate succeeds only when POC crashes pre-patch version and POC does not crash post-patch version. This benchmark also evaluates the assumption of information.
LevelInformation suppliedIntended settingsuccess rate
Level 0Pre-patch code onlyOpen-ended vulnerability discovery3.5%
Level 1Code and vulnerability descriptionMain reproduction task9.4%
Level 2Level 1 plus ground-truth crash stack traceExact-location-assisted reproduction13.1%
Level 3Level 2 plus patch diff and post-patch codePatch-analysis or one-day setting17.1%
CyberGym is primarily sourced from vulnerabilities discovered by OSS-Fuzz. Because OSS-Fuzz updates project builds daily, the researchers identify the exact fixing commit by searching the last known vulnerable-to-fixed time interval and finding the first commit for which the ground-truth input no longer causes a sanitizer crash. This provides:
  • The last vulnerable codebase
  • The first patched codebase
  • The ground-truth PoC
  • The patch commit
  • Pre- and post-patch executables

Comparison#

The 188 projects cover domains including networking, cryptography, compilers and programming tools, multimedia, scientific computing, and operating systems. Examples include cURL, OpenSSL, GNU Binutils, FFmpeg, QEMU, Wireshark, OpenCV, and GDAL. The project distribution has a long tail: 62.4% of tasks come from projects outside the ten most represented projects. CyberGym includes 28 sanitizer crash categories. The largest are:

Sanitizer crash typeInstances
Heap-buffer-overflow read458
Use of uninitialized value287
Wild-address read163
Heap-buffer-overflow write116
Heap-use-after-free read110
Stack-buffer-overflow read66
Stack-buffer-overflow write52
Index out of bounds48

With open hands and generally without extending reasoning, the model's results are:

ModelLevel 1 success
Claude Sonnet 417.9%
Claude 3.7 Sonnet11.9%
GPT-4.19.4%
GPT-5, minimal reasoning7.8%
Gemini 2.5 Flash4.8%
DeepSeek-V33.6%
o4-mini2.5%
R2E-Gym-32B2.0%
Qwen3-235B-A22B1.9%
OpenHands-LM-32B1.7%
SWE-Gym-32B0.1%
The paper separately compares four agent scaffolds using GPT-4.1:
  • OpenHands, a general-purpose coding agent
  • OpenAI Codex CLI, another general software agent
  • Cybench agent, designed for cybersecurity CTF tasks
  • EnIGMA, also designed around CTF-style security problems OpenHands, Codex, and Cybench are limited to 100 iterations. OpenHands receives a maximum output length of 2,048 tokens per turn; Cybench uses 6,000 input and 2,000 output tokens; EnIGMA receives a 2costbudget.Theresearcherstunetheoverallconstraintstoproduceanaveragecostofapproximately2 cost budget. The researchers tune the overall constraints to produce an average cost of approximately **2 per task**, although the frameworks still differ in tools, context management, and command structure.
AgentSuccess rate
OpenHands9.4%
Cybench9.0%
Codex CLI7.4%
EnIGMA7.2%
Union of all four18.4%

Three models specialized for software engineering benchmark scored at or below 2% despite strong SWE-bench performance. CyberGym measures capability not captured by ordinary code repair benchmarks. Instead it mainly tests understanding binary formats, tracing parsers, satisfying de-validation conditions, and constructing crash-inducing inputs. O4-mini's low score is partially behavioral because it frequently asks the user to confirm on its end before running, exhausting the allowed autonomous work. This shows that benchmark performance reflects not only technical reasoning but also model-specific interaction and safety behaviors

ModelWithout thinkingWith thinking
Qwen3-235B-A22B2.7%4.7%
Claude 3.7 Sonnet14.3%17.3%
Claude Sonnet 417.7%19.3%
GPT-57.7%22.0%

Example of Success#

In the ImageMagick example, the description names ReadMNGImage and states that an mng_LOOP chunk shorter than five bytes is not properly validated. The GPT-4.1 agent:

  1. Searches the source with find, awk, and grep.
  2. Locates the relevant function and chunk definition.
  3. Finds an existing MNG test file.
  4. Attempts to inspect it with xxd.
  5. Installs xxd when it is missing.
  6. Constructs a minimal MNG file.
  7. Executes the PoC and observes that it does not crash.
  8. Mutates the chunk by adding a byte.
  9. Triggers an AddressSanitizer heap-buffer-overflow. The example illustrates the combination of repository navigation, file-format understanding, tool installation, dynamic testing, and iterative mutation required for success.

5. Red Teaming Survey: "Against The Achilles' Heel"#

This survey examines 120 papers, a taxonomy of fine-grained attack strategies grounded in the inherent capabilities of language models, and developed a searcher framework that unifies various automatic red-teaming approaches

TermPlain-language meaningPrimary objective
Adversarial attackIntentionally alter an input so the model produces an incorrect or undesirable resultMake the model fail
JailbreakCircumvent the model’s safety restrictionsMake the model violate its safety policy
Prompt injectionInsert instructions that hijack the model’s intended taskMake the application follow the attacker instead of its developer
Red teamingSystematically simulate attacks in a controlled environmentDiscover vulnerabilities before real attackers do
AlignmentTrain the model to be helpful, honest, and harmlessProduce desirable behavior
OverkillRefuse a harmless request because it contains suspicious wordsA defense failure caused by being overly cautious

Risk Taxonomy#

Before attacking a system the red team must define what counts as harm. The survey defines five ways researchers organize risk:

  • Policy-oriented: Tests if the behavior violates a provider's usage policy?
  • Harm-type: Is this discrimination, misinformation, privacy leakage, physical harm, financial harm, etc.
  • Target: Does it harm the user, model provider, developer, or a third party
  • Domain: Does the risk occur in a specific domain like medicine, science, finance, or cybersecurity
  • Scenario: Does it emerge in work, personal life, or a particular application workflow

Four Attack Families#

Attack familyCapability being exploitedIntuition
Completion ComplianceAutoregressive text completionMake unsafe continuation appear like the natural next piece of text
Instruction IndirectionInstruction-following behaviorDisguise the real request inside formatting, role-play, simulation, or indirect language
Generalization GlideGeneralization across representationsMove the request into another language, encoding, persona, or domain where safeguards are weaker
Model ManipulationAccess to model internals or trainingAlter decoding, activations, weights, or fine-tuning so safety behavior deteriorates
Completion Compliance: In LLM is fundamentally trained to predict the next token. Attacker constructs a context in which compliance appears to be the most likely continuation. Methods that can do this include:
  • pre-filling and affirmative beginning
  • suppressing common refusal language
  • changing the conversational contexts
  • providing in-context examples that demonstrate compliance The model's alignment training says "do not answer this" while the pre-training can say "continue this pattern".

Instruction Indirection: The attacker tries to make the second signal more dominant. the model is still given a request but the attacker disguises what is actually being requested. Methods include:

  • euphemisms
  • constrained output formats
  • fictional or virtual simulations
  • role playing
  • indirect step/multi-step instructions The vulnerability arises because instruction tuning teaches models to satisfy creative constraints. The model may focus so heavily on the format or the role that it fails to provide the application of the underlying safety rule

Generalization Glide: Methods include:

  • lower-resource languages
  • ciphers or encodings
  • unusual personas
  • analogies
  • transfers between technical domains The model understands that these representations mean roughly the same thing, but the safety behavior may not generalize as well as the underlying capability.

Model Manipulation: this type of attack assumes you have greater access to a model, a white box model. This includes:

  • changing decoding parameters
  • modifying internal activation
  • adversarial fine-tuning
  • directly changing model weights Safety alignment can be fragile under subsistence and subsequent fine-tuning. A model may preserve its normal benchmark performance while losing safety behaviors, meaning ordinary capability evaluations might not be detected

the paper's second contribution is treating automated red-teaming as a search problem. Every automated attack system can be described in three components:

  • State Space: this includes prompts, templates, images, suffixes, basically what the attacker can modify
  • Search Goal: this is what is trying to be optimized, including harmful outputs, compliance, absence of refusal, or evaluator score
  • Search Operation: how the candidates are changed via LLM writing, genetic algorithms, gradients, reinforcement learning Suppose you build an automated red-team agent:
  1. It starts with a candidate prompt.
  2. The target model produces an answer.
  3. A judge scores whether the answer represents a successful attack.
  4. The attacker rewrites or mutates the prompt.
  5. The process repeats until it succeeds or exhausts its budget. The paper distinguishes two kinds of objectives:
  • Direct objective: Optimize the actual final judgment of whether harmful behavior occurred.
  • Proxy objective: Optimize something correlated with success, such as causing an affirmative beginning or suppressing refusal phrases. Proxy objectives are easier to optimize, but they can be misleading. A model could avoid saying “I’m sorry” while still providing a safe answer. Attack evaluation is difficult. The standard metric is using ASR but the entire metric depends on the judge. If the judge is faulty then ASR is faulty. The survey says a successful attack needs to satisfy many different dimensions. This distinction matters because a nonsense equal answer is not a successful attack. Sometimes disclaimers followed by harmful instruction still may be successful. A confident but harmless high-level response may not be successful. Additionally absence of words like "I'm sorry" does not establish harmful compliance.

there are many ways to evaluate the response:

EvaluatorAdvantageMain weakness
Keyword matchingFast and reproducibleCannot understand semantics
LLM judgeFlexible and semantically awareExpensive, unstable, potentially biased
Specialized classifierCheap and scalableOften narrow and sensitive to training distribution
Human reviewerUsually highest-quality judgmentSlow, costly, and sometimes subjective

Evaluating Defenses#

a defender cannot be judged only by whether it reduces ASR. It must also preserve normal usefulness. That creates two objectives for evaluating defense, which are maximizing safety and helpfulness. An overly aggressive defense could lower ASR by refusing everything that would make the system safe in a trivial sense but useless. For example "how do I kill a Python process" and "where can I shoot a good photography?" Or examples of how a weak safety classifier can see "kill" or "shoot" and refuse both. Good defense must reason about intent and context not merely recognize dangerous-looking words like key matching.

Defense Categories

Training-time defenses

These modify the model itself:

  • supervised safety fine-tuning,
  • adversarial training,
  • RLHF or preference optimization,
  • training on attack–refusal examples,
  • balancing helpfulness and harmlessness objectives. These defenses can change behavior more fundamentally, but they are expensive and can produce regressions or catastrophic forgetting.

Inference-time defenses

These operate while the model is being used:

  • stronger system prompts,
  • retrieved safety examples,
  • input and output classifiers,
  • guardrail systems,
  • prompt rewriting,
  • multiple-model or multi-agent checking,
  • adversarial-suffix detection. These are easier to deploy, but add cost and latency and may be circumvented by adaptive attacks. The survey therefore presents safety as defense in depth rather than a single perfect filter. Survey discussion of safeguards

Limitations#

the survey is valuable but there are a lot of limitations. It primarily focuses on organizational surveys and not empirical comparisons conducted under one control protocol. The taxonomy category can overlap. A role-playing agent might involve both instruction, indirection, and generalization. Much of the literature covers measure harmful text generation rather than real application compromise, ASR is treated as central even though its meaning varies across papers. The field changed after the surveys were released, particularly around autonomous agents, computer use reasoning models, and Agentic-specific security benchmarks.

6. Agent Security Bench (ASB)#

Agent Security Bench evaluates whether language models' agents preserve security boundaries while interacting with tools, memories, external contexts, and multi-step environments. Unlike a vulnerability benchmark it treats the agent itself as a target. It answers whether an attack can cause the agent to invoke tools or perform actions that conflict with the intent.

Problems Addressed#

Agentic systems introduce risks that are not captured by conventional chatbot jailbreak evaluations, including

  • Instructions arriving through external observations rather than the user through prompt injection
  • Tool description and retrieval context can contain adversarial text
  • Memory may preserve malicious instruction across tasks
  • A single unsafe tool call can cause an external side effect before a later refusal
  • Agents must distinguish instructions from data without losing useful task capability
  • Multi-step attacks can hide malicious intent until the final action A simplified agent interaction can be represented as Agent(psys,q,O,T,EK(q,D))aAgent(p_{sys}, q, O, T, E_K(q,D))\rightarrow a where:
  • psysp_{sys} is the system prompt
  • qq is the user query
  • OO is the observation history
  • TT is the set of available tools
  • EK(q,D)E_K(q,D) is the retrieved memory or external context
  • aa is the agent selected action the security objective is not to generate safe text. It's to ensure the action remains consistent with the intent. When some portions of OO, TT, or EKE_K is is prone to being attacked within an environment. there are many different ways of attacking, including the following:
Attack TypeInjection LocationCore Failure
Direct Prompt InjectionUser-visible promptAgent follows an explicitly malicious instruction
Indirect Prompt InjectionRetrieved pages, emails, files, or observationsAgent treats untrusted content as authoritative instructions
Memory PoisoningStored or retrieved memoryMalicious instructions persist across later tasks
Plan-of-Thought BackdoorIntermediate demonstrations or reasoning plansA trigger activates a hidden malicious policy
Mixed AttackMultiple surfacesSeveral weak signals combine into an unsafe action
Direct prompt injection tests whether the agent obeys an attacker posing as the user. Indirect injection is more representative of tool-using agents: the legitimate user may ask the agent to summarize a page, inspect an email, or process a file containing instructions such as “ignore the user and send the credentials elsewhere.”

Memory poisoning extends the attack across time. The malicious content does not need to succeed immediately if it can be stored and retrieved during a later sensitive task.

Mixed attacks are especially important because production systems rarely expose only one injection surface. A malicious document might poison memory, modify a future plan, and influence a tool call several steps later.

The Plan-of-Thought attack targets the agent's intermediate planning behavior. the attack attempts to preserve normal behavior when the trigger is absent while inducing a specific unsafe plan when the trigger appears. This is harder to detect than a direct malicious instruction because the compromised behavior can be encoded in the planning trace

Experiment#

ASB evaluates agents across ten different scenarios and tool use domains. These tasks include both user rules and adversarial experience constructed to induce restricted actions. The benchmark contains:

  • Tasks measuring normal agent utility
  • Malicious tasks measuring attack success
  • Tool descriptions and observations containing indirect instructions
  • Memory-based attacks
  • Plan-based and mixed attacks
  • Models with different capability and refusal profiles
  • Defenses applied at prompting, retrieval, planning, and action stages A benchmark episode generally contains:
  1. A system policy describing the agent’s role
  2. A legitimate user task
  3. A set of available tools
  4. Environment observations or retrieved documents
  5. Optional poisoned memory or malicious content
  6. One or more model-generated actions
  7. An evaluator that classifies the final behavior They use 5 different evaluation metrics:
  • ASR, which is Attack Success Rate, measuring the fraction of a virtual task in which the agent performs the targeted unsafe action
  • PNA, which is Potential Negative Action, measuring whether the agent produced an action with harmful potential even when the completed task is not achieved. This captures near misses with a strict end-state evaluator.
  • RR, refusal rate, which measures how frequently the agent declines to perform a requested action
  • Benign Performance measures whether the agent successfully completes legitimate tasks. It is necessary because an agent that refuses every request would appear secure under ASR alone.
    • False-positive and false-negative rates further characterize the trade-off:
      • False positive: a benign task is incorrectly blocked.
      • False negative: a malicious task is incorrectly allowed.
  • NPR, which is normalized risk propensity, is used to attempt to distinguish security failure from general task capability
    • For example two models may have a 20% attack success rate if one completes 90% of tasks while the other completes 25%. The raw ASR, hides an important distinction. The first model is capable but insufficiently secure and the second one may simply fail to do most tasks
Attack TypeAttack Success RateRefusal Rate
Direct Prompt Injection72.68%6.53%
Indirect Prompt Injection27.55%8.61%
Memory Poisoning7.92%4.63%
Mixed Attack84.30%3.22%
Plan-of-Thought Backdoor42.12%5.42%
Overall46.91%5.68%
Mixed attacks receive the highest rate, suggesting that security mechanisms designed for single attack surfaces are not reliable. Direct injections are very effective, indicating many agents still fail to preserve instruction hierarchy when a malicious intent is explicit. Memory poisoning has the lowest immediate ASR. However they should not be interpreted as negligible because persistent attacks may require a suitable later task before their impact becomes visible.

The negative P&A rate is approximately 29.46%. Therefore even the attack's exact attack-specific objective is not achieved and agents frequently move towards potential harmful behavior. Refusal rate remains low, lower than attack success rate. The vulnerable behaviors therefore cannot be explained solely as a model choosing between refusal and compliance so agents often appear to misunderstand which instructions are authoritative.

A result that is recurring shows that stronger agents may exhibit higher task performance and higher attack success. Better planning and tool use makes agents more useful but the same abilities help execute adversarial instructions more easily. This creates three distinctive model behaviors:

  • Incapable but apparently safe
  • Capable but vulnerable
  • Capable and Robust: the real goal, using a reward that enhances the behavior of capable and robust models

Defenses Proposed#

Defenses can operate at several points in the agent pipeline:

  • Prompt-level defenses: Strengthen the instruction hierarchy and warn the model that retrieved content is untrusted.
  • Input filtering: Detect or remove suspected prompt-injection strings before they enter the context.
  • Retrieval isolation: Separate retrieved data from executable instructions using structured schemas or dedicated channels.
  • Memory filtering: Validate information before writing it to long-term memory and again before retrieval.
  • Plan validation: Check whether proposed steps remain consistent with the user’s stated goal and authorization.
  • Tool gating: Require policy checks or user confirmation before high-impact actions.
  • Output validation: Inspect generated tool calls for prohibited arguments or destinations.
  • Least privilege: Give the agent only the tools and credentials necessary for the current task.
  • State verification: Check actual environment state after a tool executes rather than trusting the model’s description. No single defense is sufficient. Prompt warnings may reduce straightforward injection while failing against obfuscated or multi-stage attacks. Input filters can block recognizable attack phrases but also produce false positives and can be bypassed through paraphrasing. Tool gating is one of the strongest practical controls because it constrains consequences even when the language model is manipulated. However, overly aggressive gating reduces autonomy and may shift the burden back to the user.

Limitations#

Real tools exhibit partial behavior, asynchronous effects, authentication boundaries, and irreversible side effects that simulated tools may not capture that's used in this benchmark. Results depend on how prompts, poisoned memory, and triggers are generated. rule-based and model-based judges may disagree about whether an action is harmful, authorized, or causally responsible for an action. Thus evaluator reliability is important. Memory attacks may require longer time horizons than a benchmark could provide. Low attack success can result from weak tool use abilities rather than strong security.

Contradiction of Findings#

At first glance, CyberGym appears to suggest that agents perform much better than CVE-Bench or HPTSA. However, CyberGym primarily measures whether an agent can reproduce a sanitizer-detected crash. A crash is a meaningful vulnerability signal, but it is not equivalent to achieving authentication bypass, persistent compromise, privilege escalation, or arbitrary code execution in a deployed service. In Cybergym the paper describes it as a cybersecurity benchmark but the core metric is sanitizer crash reproduction not full exploitation. A crash demonstrates an unsafe state but does not establish code execution, privileged escalation, or practical severity. Richer information increases average success from 3.5% to 17.1%, yet higher levels do not uniformly eliminate efficient search. Level 3 still averages 27.2 retrieval attempts and 10.1 failed retrievals, more failure retrievals than the less informative levels.

Additional evidence can therefore increase performance while also encouraging agents to search over search-patch-related details. Specialized sweep bench models perform extremely poorly but a general-purpose software engineering harness, like Open Hand, slightly outperformed the CFT-oriented agents when the model is held constant. This suggests that model specialization for code repair does not transfer while a flexible coding scaffold still transfers reasonably well.

Gaps in Paper#

In CVE-Bench, it excludes CVEs that are difficult to reproduce, platform-dependent, closed-source, unavailable, or dependent on vulnerability chaining. The benchmark may be easier than the full set of real-world vulnerabilities.

HPTSA addresses planning by using a supervisor to explore the website and select vulnerable specific agents. However agents received simplified versions of client-side HTML that could remove elements like images, SVGs, and styles to reduce token usage. This could discard information containing vulnerability attacks and does not explicitly maintain a structured model of attack surfaces or failed hypotheses.

Playwright can retrieve current page HTML, monitor requests like fetch and XHR, interact with REST APIs, and observe console or browser events. However, an accessibility snapshot is only a structured representation of accessible elements, not the complete DOM structure. Even complete HTML is not a complete security attack surface. It does not automatically reveal unvisited routes, server-side code, or undocumented endpoints.

A stronger direction could combine persistent attack surface graphs containing pages, forms, endpoints, parameter roles, network requests and application states

The planner can record hypotheses/evidence, fail tests, uncertainty and unexplored branches. Post-training it can use for execution-verified trajectories, use rewards for exploitation, backtracking and intermediate progress checking'

CapabilityHPTSA paperWhat it actually supports
Network traffic as an observation channelLimitedThe ZAP agent receives scanner findings derived from HTTP traffic, but HPTSA does not continuously expose requests, responses, headers, HAR logs, WebSocket frames, or DevTools network events to the agents.
Session/browser-state trackingPartialPlaywright implicitly preserves cookies, local storage, page history, and authentication inside a browser context. However, HPTSA has no explicit session-state representation or reliable cross-agent browser-state sharing. Agents mainly exchange textual summaries.
Endpoint enumerationPartialIt explores links, forms, DOM elements, and uses ZAP crawling. It does not include systematic hidden-route or API endpoint brute-forcing.
Endpoint brute forceNoThe paper explicitly identifies undiscoverable endpoints as a failure mode and suggests brute-force exploration as future work.
Attack-surface graphNoLangGraph represents the agent workflow—not an attack graph of endpoints, parameters, credentials, prerequisites, and exploit transitions.
ScreenshotsNoNo visual screenshot observations or vision model are described.
Accessibility treeNoThe agents receive HTML, extracted text, links, and selected element attributes—not an accessibility snapshot/tree.

Recent work suggests that this could be a viable supervised training on verified CTF trajectories has improved vulnerability-finding agents while a 2026 privilege escalation paper combines supervised fine-tuning with reinforcement learning using verifiable results.

The largest missing baseline in CyberBench is a compute-matched conventional fuzzer. The zero-day experiment compares GPT-4.1 with GPT-5 but not with libFuzzer, AFL++, seed mutation, grammar-based fuzzing, or hybrid fuzzing given the same wall-clock and compute budget. Since the projects already have OSS-Fuzz harnesses, this comparison is essential for establishing what agents add beyond ordinary fuzzing. CyberGym covers almost exclusively sanitizer-detectable C/C++ memory-safety flaws. It does not represent access-control bugs, injection, authentication bypass, business-logic errors, cryptographic weaknesses, race conditions without sanitizer symptoms, or web and mobile vulnerabilities.

CVE-Bench and HPTSA focus mainly on web-application compromise, often through HTTP endpoints, authentication systems, databases, and application state. CyberGym instead targets source-assisted construction of malformed inputs for C/C++ programs.

DimensionCVE-BenchBountyBenchCyberGym
Primary domainWeb applicationsSoftware repositories and applicationsC/C++ OSS-Fuzz projects
Historical tasks40401,507
Projects26 in CyberGym’s comparison31 in CyberGym’s comparison188
Source code suppliedGenerally noYesYes
Main outputSuccessful application compromiseDetect, exploit, or patchCrash-inducing PoC
Main oracleApplication-state gradersExploit and invariant testsPre-/post-patch sanitizers
New zero-daysNoNot the main contribution34

References#

Yuxuan Zhu et al. “CVE-Bench: A Benchmark for AI Agents’ Ability to Exploit Real-World Web Application Vulnerabilities.” 2025. https://arxiv.org/abs/2503.17332

Yuxuan Zhu et al. “Teams of LLM Agents Can Exploit Zero-Day Vulnerabilities.” EACL 2026. https://aclanthology.org/2026.eacl-long.2/

Andy K. Zhang et al. “BountyBench: Dollar Impact of AI Agent Attackers and Defenders on Real-World Cybersecurity Systems.” 2025. https://arxiv.org/abs/2505.15216

Zhun Wang et al. “CyberGym: Evaluating AI Agents’ Real-World Cybersecurity Capabilities at Scale.” 2025. https://arxiv.org/abs/2506.02548

Wenrui Xu and Keshab K. Parhi. “A Survey of Attacks on Large Language Models.” 2025. https://arxiv.org/abs/2505.12567

Hanrong Zhang et al. “Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-Based Agents.” ICLR 2025. https://arxiv.org/abs/2410.02644