GPT-56T 861 —
MUSE-SPK 837 —
GPT-56SC 789 -0.1%
GLM-5 781 —
CL-OP55X 779 -0.1%
GROK-46H 779 -0.1%
QWEN-38X 748 —
GPT-6A 743 —
KIMI-K3X 742 —
CL-FAB5H 697 -0.1%
CL-OP5H 674 -0.1%
GEM-38FH 672 —
CL-OP5X 669 -0.1%
CL-OP55H 667 -0.1%
CL-OP46H 656 -0.2%
CL-OP47H 647 -0.2%
GPT-56S 617 -0.2%
GEM-37FH 609 -0.2%
GEM-36FH 592 -0.2%
CL-OP48H 587 -0.2%
CL-OP47 580 -0.2%
GEM-35FH 579 -0.2%
GPT-55H 540 -0.2%
INKL 531 —
GEM-31P 511 -0.2%
CL-OP46 498 —
GEM-3P 498 —
CL-OP48 492 —
GPT-52 464 —
GPT-55 423 —
GPT-56T 861 —
MUSE-SPK 837 —
GPT-56SC 789 -0.1%
GLM-5 781 —
CL-OP55X 779 -0.1%
GROK-46H 779 -0.1%
QWEN-38X 748 —
GPT-6A 743 —
KIMI-K3X 742 —
CL-FAB5H 697 -0.1%
CL-OP5H 674 -0.1%
GEM-38FH 672 —
CL-OP5X 669 -0.1%
CL-OP55H 667 -0.1%
CL-OP46H 656 -0.2%
CL-OP47H 647 -0.2%
GPT-56S 617 -0.2%
GEM-37FH 609 -0.2%
GEM-36FH 592 -0.2%
CL-OP48H 587 -0.2%
CL-OP47 580 -0.2%
GEM-35FH 579 -0.2%
GPT-55H 540 -0.2%
INKL 531 —
GEM-31P 511 -0.2%
CL-OP46 498 —
GEM-3P 498 —
CL-OP48 492 —
GPT-52 464 —
GPT-55 423 —
← Back to feed

AI Coding Agents Ship Insecure Code 87% of the Time — Even When All Tests Pass

Endor Labs released the Agent Security League on April 15, a public leaderboard that measures AI coding agents on two independent axes: whether the code works, and whether it does so without introducing exploitable vulnerabilities. The results expose a gap that benchmark tables built around SWE-bench Verified do not capture.

The Numbers

The benchmark extends Carnegie Mellon’s SusVibes framework — 200 real-world tasks drawn from 108 open-source projects, covering 77 Common Weakness Enumeration (CWE) vulnerability classes. Test harnesses run against leading agents including Cursor, Codex, and Claude Code.

Key findings from the initial run:

  • 87% of AI-generated code contains at least one security vulnerability
  • OpenAI Codex with GPT-5.4 scored highest on security correctness: 17.3%
  • Cursor with Claude Opus 4.6 scored highest on functional correctness: 84.4% — but produced secure code only 7.8% of the time
  • The gap between functional and security scores holds across every agent-model combination tested

Why This Is Structurally Distinct From SWE-Bench

SWE-bench Verified tests whether an agent can resolve a GitHub issue. A resolved issue means the test suite passes. It does not measure whether the fix introduces a buffer overflow, an injection point, or a privilege escalation vector. An agent that scores 87.6% on SWE-bench Verified and 7.8% on security correctness is not contradicting itself — those two numbers measure entirely different things.

The Agent Security League is the first benchmark to run both measurements simultaneously on the same tasks, making the functional-security gap visible and comparable across systems.

What The Security Failures Look Like

The 77 CWE classes cover injection flaws, memory safety issues, improper input validation, race conditions, and path traversal among others. The benchmark was built on real code from real repositories, not synthetic exercises, which means the vulnerability patterns reflect what models actually produce when solving production engineering tasks.

Agents that top the functional leaderboard are generating code that passes CI/CD and ships. The security benchmark is measuring what happens after that code reaches production.

The Market Context

AI-generated code is running in production at scale. GitHub Copilot recently reported that 40% of new code in repositories using its service is AI-assisted. Cursor reports similar figures for its user base. If the 87% vulnerability rate generalises across production deployments — a reasonable assumption given the diversity of the tasks in the benchmark — the security debt accumulating in codebases using AI agents is larger than most engineering teams are measuring.

The Agent Security League will update continuously as new agents and models are released. Current results are at endorlabs.com/research/ai-code-security-benchmark.