EVMbench: Evaluating AI Agents on Smart Contract Security
Abstract
Smart contracts on public blockchains now manage large amounts of value, and vulnerabilities in these systems can lead to substantial losses. As AI agents become more capable at reading, writing, and running code, it is natural to ask how well they can already navigate this landscape, both in ways that improve security and in ways that might increase risk. We introduce EVMbench, an evaluation that measures the ability of agents to detect, patch, and exploit smart contract vulnerabilities. EVMbench draws on 117 curated vulnerabilities from 40 repositories and, in the most realistic setting, uses programmatic grading based on tests and blockchain state under a local Ethereum execution environment. We evaluate a range of frontier agents and find that they are capable of discovering and exploiting vulnerabilities end-to-end against live blockchain instances. We release code, tasks, and tooling to support continued measurement of these capabilities and future work on security.
Lay Summary
Smart contracts are programs that run on blockchains and can control large amounts of money, so bugs in them can lead to immediate losses. As AI systems become better at reading, writing, and running code, it is important to understand whether they can find these bugs, fix them, or exploit them. We built EVMBench, a benchmark based on 117 serious vulnerabilities from real smart contract audits. EVMBench asks AI agents to do three kinds of security work: identify vulnerabilities in code, repair code so attacks no longer work, and carry out attacks in a local blockchain environment. This setup lets us grade agents automatically in realistic environments without putting real funds at risk. We evaluated several advanced AI agents and found that some can already discover and exploit serious vulnerabilities end-to-end, although performance varies across tasks. We are releasing the benchmark, dataset, and tools so researchers can track these capabilities over time. Better measurement can help developers use AI for defense while also informing decisions about when powerful systems may create security risks.