# CWE-bench v2 (CWE-bench)

> Defensive vulnerability patching on 250 audit-and-patch tasks spanning 185 weakness types, 100 public and 150 held out.

Canonical page: https://benchlm.ai/benchmarks/cwe-bench

- Category: [Agentic](/agentic)
- Last updated: November 11, 2026

## About CWE-bench

- Year: 2026
- Tasks: Audit and patch C/C++, Go, Java, TypeScript/JavaScript, Python, and Rust repositories; 100 public and 150 held-out tasks
- Format: Pass@1
- Difficulty: Frontier agent evaluation
- Paper: [CWE-bench v2 leaderboard and methodology](https://cwe-bench.com/)

The deterministic programmatic pass@1 score requires blocking the exploit while preserving existing tests, over all 250 tasks. Models use high reasoning, four rollouts per task, and a one-hour limit per rollout. Version 2 (November 2, 2026) adds a public set of 100 tasks and raises coverage from 73 to 185 weakness types, so its scores are not comparable with v1, whose last scores stay on the same page. Pass@4 and judge-panel scores are separate metrics.

CWE-bench is currently displayed on BenchLM for reference, but it is excluded from the weighted scoring formula.

## Leaderboard (11 models)

| Rank | Model | Creator | Score |
|------|-------|---------|-------|
| 1 | [Claude Opus 5.5](/models/claude-opus-5-5) | Anthropic | 67.1% |
| 2 | [Muse Wonder](/models/muse-wonder) | Meta | 66.1% |
| 3 | [Gemini 4 Argon](/models/gemini-4-argon) | Google | 65.0% |
| 4 | [GPT-6 Astra](/models/gpt-6-astra) | OpenAI | 64.2% |
| 5 | [DeepSeek V4.1 Flash 1017](/models/deepseek-v4-1-flash) | DeepSeek | 57.6% |
| 6 | [Grok 4.7](/models/grok-4-7) | xAI | 54.7% |
| 7 | [Hy4 preview](/models/hy4-preview) | Tencent | 47.3% |
| 8 | [Mistral Large 4](/models/mistral-large-4) | Mistral | 45.6% |
| 9 | [Qwen3.8 Max](/models/qwen3-8-max) | Alibaba | 45.4% |
| 10 | [Kimi K3.1 Pro](/models/kimi-3-1-pro) | Moonshot AI | 45.3% |
| 11 | [GLM-5.3](/models/glm-5-3) | Z.AI | 42.0% |

## CWE-bench version history

Every CWE-bench version BenchLM has recorded, newest first. Version 2 changes the task set (250 tasks, 185 weakness types, a public set of 100), so its pass@1 scores are not comparable with v1; ranks are the fairer way to follow a model across versions.

| Release | Released | Tasks | Leader | What changed |
|---|---|---|---|---|
| [CWE-bench v2](https://cwe-bench.com/) | 2026-11-02 | 250 tasks (100 public, 150 held out) | Claude Opus 5.5 (67.1%) | Adds a public set of 100 tasks to 150 held-out ones and raises coverage from 73 to 185 weakness types. Pass@1 is over all 250 tasks. |
| [CWE-bench v1](https://cwe-bench.com/) | 2026-09-25 | 120 held-out tasks | Gemini 4 Carbon (71.0%) | 120 held-out tasks across 73 weakness types, grouped by the OWASP Top 10. The source no longer shows this table; scores are as last captured on October 28, 2026. |

## Model rank by CWE-bench version

Rank among models on each official board (best configuration per model).

| Model | v2 rank | v1 rank |
|---|---|---|
| Claude Opus 5.5 | #1 of 11 (67.1%) | #5 of 12 (67.0%) |
| Muse Wonder | #2 of 11 (66.1%) | — |
| Gemini 4 Argon | #3 of 11 (65.0%) | #2 of 12 (68.0%) |
| GPT-6 Astra | #4 of 11 (64.2%) | #2 of 12 (68.0%) |
| DeepSeek V4.1 Flash 1017 | #5 of 11 (57.6%) | #8 of 12 (55.0%) |
| Grok 4.7 | #6 of 11 (54.7%) | #2 of 12 (68.0%) |
| Hy4 preview | #7 of 11 (47.3%) | #10 of 12 (53.0%) |
| Mistral Large 4 | #8 of 11 (45.6%) | — |
| Qwen3.8 Max | #9 of 11 (45.4%) | — |
| Kimi K3.1 Pro | #10 of 11 (45.3%) | — |
| GLM-5.3 | #11 of 11 (42.0%) | — |
| Gemini 4 Carbon | — | #1 of 12 (71.0%) |
| Claude Fable 5.1 | — | #6 of 12 (58.0%) |
| Grok 4.6 | — | #7 of 12 (57.0%) |
| Muse Spark 1.3 | — | #8 of 12 (55.0%) |
| GPT-6 Sol | — | #11 of 12 (52.0%) |
| Inkling | — | #12 of 12 (37.0%) |

## CWE-bench v1

| Rank | Model | Score |
|---|---|---|
| 1 | [Gemini 4 Carbon](/models/gemini-4-carbon) | 71.0% |
| 2 | [GPT-6 Astra](/models/gpt-6-astra) | 68.0% |
| 3 | [Gemini 4 Argon](/models/gemini-4-argon) | 68.0% |
| 4 | [Grok 4.7](/models/grok-4-7) | 68.0% |
| 5 | [Claude Opus 5.5](/models/claude-opus-5-5) | 67.0% |
| 6 | [Claude Fable 5.1](/models/claude-fable-5-1) | 58.0% |
| 7 | [Grok 4.6](/models/grok-4-6) | 57.0% |
| 8 | [DeepSeek V4.1 Flash 1017](/models/deepseek-v4-1-flash) | 55.0% |
| 9 | [Muse Spark 1.3](/models/muse-spark-1-3) | 55.0% |
| 10 | [Hy4 preview](/models/hy4-preview) | 53.0% |
| 11 | [GPT-6 Sol](/models/gpt-6-sol) | 52.0% |
| 12 | [Inkling](/models/inkling) | 37.0% |

## FAQ

### What does CWE-bench measure?

Defensive vulnerability patching on 250 audit-and-patch tasks spanning 185 weakness types, 100 public and 150 held out.

### Which model scores highest on CWE-bench?

Claude Opus 5.5 by Anthropic currently leads with a score of 67.1% on CWE-bench.

### How many models are evaluated on CWE-bench?

11 AI models have published results on CWE-bench in the BenchLM catalog.

### Does CWE-bench affect BenchLM's overall score?

Not directly. CWE-bench is still displayed on BenchLM for reference, but it is excluded from the weighted scoring formula.

## Compare Top Models on CWE-bench

- [Claude Opus 5.5 vs Muse Wonder](/compare/claude-opus-5-5-vs-muse-wonder)
- [Muse Wonder vs Gemini 4 Argon](/compare/gemini-4-argon-vs-muse-wonder)
- [Gemini 4 Argon vs GPT-6 Astra](/compare/gemini-4-argon-vs-gpt-6-astra)
- [GPT-6 Astra vs DeepSeek V4.1 Flash 1017](/compare/deepseek-v4-1-flash-vs-gpt-6-astra)
