# CWE-bench: Refocusing Agentic Security from Exploitation to Defense

DevFeed: [CWE-bench: Refocusing Agentic Security from Exploitation to Defense](<https://devfeed.tech/articles/cwe-bench-refocusing-agentic-security-from-exploitation-to-defense-126899.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.17020>)

Author: Gonzalo Gonzalez-Pumariega, Ajay Jagannath, Adit Jain, Guram Gogia, Soumyadeep Bakshi, Nazneen Rajani

Published: 2026-11-10T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>), [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [LLM security](<https://devfeed.tech/topics/llm-security.md>), [Agentic AI](<https://devfeed.tech/topics/what-is-agentic-ai.md>), [patches](<https://devfeed.tech/topics/patches.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agentic](<https://devfeed.tech/tags/agentic.md>), [agentic-security](<https://devfeed.tech/tags/agentic-security.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai](<https://devfeed.tech/tags/ai.md>), [audit](<https://devfeed.tech/tags/audit.md>), [bench](<https://devfeed.tech/tags/bench.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [cwe](<https://devfeed.tech/tags/cwe.md>), [cwe-bench](<https://devfeed.tech/tags/cwe-bench.md>), [cybersecurity](<https://devfeed.tech/tags/cybersecurity.md>), [defender](<https://devfeed.tech/tags/defender.md>), [defense](<https://devfeed.tech/tags/defense.md>), [defensive](<https://devfeed.tech/tags/defensive.md>), [evaluations](<https://devfeed.tech/tags/evaluations.md>), [exploit](<https://devfeed.tech/tags/exploit.md>), [exploitation](<https://devfeed.tech/tags/exploitation.md>), [functionality](<https://devfeed.tech/tags/functionality.md>), [languages](<https://devfeed.tech/tags/languages.md>), [security](<https://devfeed.tech/tags/security.md>)

## AI overview

CWE-bench measures whether AI agents can find and repair vulnerabilities, addressing the gap between demonstrating an exploit and making software safe. It contains 250 repository audit-and-repair tasks across 185 CWE types, eight languages, and ten weakness classes; 100 tasks are public and 150 held out. Agents receive a repository and threat model but no information about the weakness, its location, or the number of vulnerable sites. Patches must block the exploit while preserving functionality, as checked by deterministic verifiers curated with agentic judges and reviewed by hand. The best agent scores 67% pass@1 and 79% pass@4. Similar pass@1 scores can mask different retry gains and costs, and no agent leads across every language or weakness class.

## Source excerpt

arXiv:2610.17020v2 Announce Type: replace Abstract: Cybersecurity evaluations of AI agents have focused largely on offense, yet a working exploit does not show that an agent can make software safe. An attacker needs to exploit only one vulnerability; a defender must find and fix all of them. We introduce CWE-bench, a benchmark of 250 repository audit-and-repair tasks spanning 185 CWE types and eight languages, grouped into ten weakness classes. We release 100 tasks publicly and keep 150 held out. Agents are given a repository to audit and a description of its threat model, but are not told the weakness, where it occurs, or how many vulnerable sites there are. Each patch must block the exploit while preserving original functionality, as checked by a deterministic programmatic verifier. Verifiers were curated with panels of agentic judges and reviewed by hand, so that they reject incomplete repairs without penalizing correct ones. The best agent reaches 67% pass@1 and 79% pass@4. We further conduct analyses showing that (i) agents with similar pass@1 differ widely in retry gains and cost, and (ii) no single agent is best across languages or weakness classes. As the offensive capabilities of agents improve, CWE-bench provides a broad and rigorous measure of whether their defensive capabilities keep pace.