CWEval
The benchmark’s paper hasn’t scored a model released after Claude 3.5 Haiku (October 2024). Labs report their own numbers for one newer model: Qwen3-Coder-Next at 56.3%.
Models write code for security-critical tasks in several languages. Outcome-driven test oracles check both functionality (func@k) and security (func-sec@k).
Published at the LLM4Code 2025 workshop.
- Made by
- Columbia University
- Released
- January 2025
- Kind
- Secure code and review
- Level
- Expert
- Scored
- Checked automatically
- Answers
- Code
- Tasks
- All public
- Measures
- Capability
- Language
- English
- Interaction
- Single turn
- Refresh
- One fixed set
- Run by
- Anyone
- Strongest model tested
- Claude 3.5 Sonnet (October 2024) #151 on the capability index
- Last in a system card
- February 2026
- Last model added
- February 2026
- Updated automatically
- No, from its paper
- Scores refreshed
- November 20th, 2026
In the authors’ words
Large Language Models (LLMs) have significantly aided developers by generating or assisting in code writing, enhancing productivity across various tasks. While identifying incorrect code is often straightforward, detecting vulnerabilities in functionally correct code is more challenging, especially for developers with limited security knowledge, which poses considerable security risks of using LLM-generated code and underscores the need for robust evaluation benchmarks that assess both functional correctness and security. Current benchmarks like CyberSecEval and SecurityEval attempt to solve it but are hindered by unclear and impractical specifications, failing to assess both functionality and security accurately. To tackle these deficiencies, we introduce CWEval, a novel outcome-driven evaluation framework designed to enhance the evaluation of secure code generation by LLMs. This framework not only assesses code functionality but also its security simultaneously with high-quality task specifications and outcome-driven test oracles which provides high accuracy. Coupled with CWEval-bench, a multilingual, security-critical coding benchmark, CWEval provides a rigorous empirical security evaluation on LLM-generated code, overcoming previous benchmarks' shortcomings. Through our evaluations, CWEval reveals a notable portion of functional but insecure code produced by LLMs, and shows a serious inaccuracy of previous evaluations, ultimately contributing significantly to the field of secure code generation. We open-source our artifact at: https://github.com/Co1lin/CWEval .
GPT-4o leads with 50.2% among models released by October 2024 GPT-4o leads with 50.2% among models released by October 2024
Best score per entry from the benchmark's paper, read on November 20th, 2026. A paper’s table doesn’t add newer models. Where a model ran with several settings or harnesses, we keep its best. Every run is in the next chart. Names in gray aren't in our model list: fine-tunes, agent systems, products and older models. They don't count toward leaders. This view shows only models we track, each at its best.
Qwen3-Coder-Next leads with 56.3%, claims included
Best score per model from every source, including labs’ own numbers and claims Epoch AI collected from reports and papers. Labs pick their own settings, so a claim can beat an independent run of the same model. Striped bars are claims, and dotted bars are reruns by Epoch AI or another board.
The newest model with a score here came out in October 2024, and nobody has tested a newer one. Among the 20 highest-ranked models on the capability index, these have no score yet:
- Claude Fable 5.2
- GPT-6.2 Astra
-
Gemini 4 Carbon
- GPT-6 Astra
- and 16 more
- 1 GPT-4o Aug 2024, Default, temperature 0.8 50.2%
- 2 GPT-4o mini security instr., temperature 0.8 48.2%
- 3 Claude 3.5 Haiku security instr., temperature 0.8 47.1%
- 4 Claude 3.5 Sonnet (October 2024) Default, temperature 0.8 46.7%
- 5
Llama 3.1-70B Default, temperature 0.8 39.6%
- 6
Gemini 1.5 Pro Sep 2024, Default, temperature 0.8 38.1%
- 7
Llama 3.1-405B Default, temperature 0.8 36.2%
- 8
Gemini 1.5 Flash Sep 2024, security instr., temperature 0.8 36.1%
- 9
Llama 3.1-8B Default, temperature 0.8 26.5%
- 10 CodeLlama-7b-hf Default, temperature 0.8 13.8%
Source: The CWEval paper
- 1 GPT-4o Aug 2024, Default, temperature 0.8 50.2%
- 2 GPT-4o mini security instr., temperature 0.8 48.2%
- 3 Claude 3.5 Haiku security instr., temperature 0.8 47.1%
- 4 Claude 3.5 Sonnet (October 2024) Default, temperature 0.8 46.7%
- 5
Llama 3.1-70B Default, temperature 0.8 39.6%
- 6
Gemini 1.5 Pro Sep 2024, Default, temperature 0.8 38.1%
- 7
Llama 3.1-405B Default, temperature 0.8 36.2%
- 8
Gemini 1.5 Flash Sep 2024, security instr., temperature 0.8 36.1%
- 9
Llama 3.1-8B Default, temperature 0.8 26.5%
Source: The CWEval paper
- 1
Qwen3-Coder-Next 56.3%
- 2 GPT-4o Aug 2024, Default, temperature 0.8 50.2%
- 3 GPT-4o mini security instr., temperature 0.8 48.2%
- 4 Claude 3.5 Haiku security instr., temperature 0.8 47.1%
- 5 Claude 3.5 Sonnet (October 2024) Default, temperature 0.8 46.7%
- 6
Llama 3.1-70B Default, temperature 0.8 39.6%
- 7
Gemini 1.5 Pro Sep 2024, Default, temperature 0.8 38.1%
- 8
Llama 3.1-405B Default, temperature 0.8 36.2%
- 9
Gemini 1.5 Flash Sep 2024, security instr., temperature 0.8 36.1%
- 10
Llama 3.1-8B Default, temperature 0.8 26.5%
Sources: Labs’ model cards and the CWEval paper
| # | Entry | Score | Setting | Date | Source |
|---|---|---|---|---|---|
| 1 | GPT-4o Aug 2024 | 50.2% | Default, temperature 0.8 | Aug 2024 | Official leaderboard |
| 2 | GPT-4o mini | 48.2% | security instr., temperature 0.8 | Jul 2024 | Official leaderboard |
| 3 | Claude 3.5 Haiku | 47.1% | security instr., temperature 0.8 | Oct 2024 | Official leaderboard |
| 4 | Claude 3.5 Sonnet (October 2024) | 46.7% | Default, temperature 0.8 | Oct 2024 | Official leaderboard |
| 5 | | 39.6% | Default, temperature 0.8 | Jul 2024 | Official leaderboard |
| 6 | | 38.1% | Default, temperature 0.8 | Sep 2024 | Official leaderboard |
| 7 | | 36.2% | Default, temperature 0.8 | Jul 2024 | Official leaderboard |
| 8 | | 36.1% | security instr., temperature 0.8 | Aug 2024 | Official leaderboard |
| 9 | | 26.5% | Default, temperature 0.8 | Jul 2024 | Official leaderboard |
| 10 | CodeLlama-7b-hf | 13.8% | Default, temperature 0.8 | Official leaderboard |
| # | Model | Score | Setting | Date | Source |
|---|---|---|---|---|---|
| 1 | GPT-4o Aug 2024 | 50.2% | Default, temperature 0.8 | Aug 2024 | Official leaderboard |
| 2 | GPT-4o mini | 48.2% | security instr., temperature 0.8 | Jul 2024 | Official leaderboard |
| 3 | Claude 3.5 Haiku | 47.1% | security instr., temperature 0.8 | Oct 2024 | Official leaderboard |
| 4 | Claude 3.5 Sonnet (October 2024) | 46.7% | Default, temperature 0.8 | Oct 2024 | Official leaderboard |
| 5 | | 39.6% | Default, temperature 0.8 | Jul 2024 | Official leaderboard |
| 6 | | 38.1% | Default, temperature 0.8 | Sep 2024 | Official leaderboard |
| 7 | | 36.2% | Default, temperature 0.8 | Jul 2024 | Official leaderboard |
| 8 | | 36.1% | security instr., temperature 0.8 | Aug 2024 | Official leaderboard |
| 9 | | 26.5% | Default, temperature 0.8 | Jul 2024 | Official leaderboard |
| # | Model | Score | Setting | Date | Source |
|---|---|---|---|---|---|
| 1 | 56.3% | Feb 2026 | Lab model card | ||
| 2 | GPT-4o Aug 2024 | 50.2% | Default, temperature 0.8 | Aug 2024 | Official leaderboard |
| 3 | GPT-4o mini | 48.2% | security instr., temperature 0.8 | Jul 2024 | Official leaderboard |
| 4 | Claude 3.5 Haiku | 47.1% | security instr., temperature 0.8 | Oct 2024 | Official leaderboard |
| 5 | Claude 3.5 Sonnet (October 2024) | 46.7% | Default, temperature 0.8 | Oct 2024 | Official leaderboard |
| 6 | 39.6% | Default, temperature 0.8 | Jul 2024 | Official leaderboard | |
| 7 | 38.1% | Default, temperature 0.8 | Sep 2024 | Official leaderboard | |
| 8 | 36.2% | Default, temperature 0.8 | Jul 2024 | Official leaderboard | |
| 9 | 36.1% | security instr., temperature 0.8 | Aug 2024 | Official leaderboard | |
| 10 | 26.5% | Default, temperature 0.8 | Jul 2024 | Official leaderboard |
Labs report scores for 1 model in their cards. Switch the scores above to rank them together.
Rankings by part
We read 6 parts from the benchmark’s paper, each ranking models on one part of the test, such as func@1, func@10 and func@50. GPT-4o leads 2 of them, and 2 other models lead the rest. Arrows show how far a model moved from its overall rank among the models we track.
func@1
9 models we track have a score here.
- 1 GPT-4o Aug 2024 80.8%
- 2 Claude 3.5 Sonnet (October 2024) ↑2 78.2%
- 3 GPT-4o mini ↓1 75.4%
- 4 Claude 3.5 Haiku ↓1 73.8%
- 5
Llama 3.1-70B 71.8%
- 6
Gemini 1.5 Flash Sep 2024 ↑2 70.7%
- 7
Llama 3.1-405B 69.3%
- 8
Gemini 1.5 Pro Sep 2024 ↓2 69%
- 9
Llama 3.1-8B 52.6%
func@10
9 models we track have a score here.
- 1 GPT-4o mini ↑1 91.4%
- 2 Claude 3.5 Sonnet (October 2024) ↑2 91.4%
- 3 GPT-4o Aug 2024 ↓2 90.7%
- 4
Llama 3.1-405B ↑3 88.9%
- 5 Claude 3.5 Haiku ↓2 85.3%
- 6
Llama 3.1-70B ↓1 85.2%
- 7
Gemini 1.5 Flash Sep 2024 ↑1 84.4%
- 8
Gemini 1.5 Pro Sep 2024 ↓2 83.3%
- 9
Llama 3.1-8B 80.5%
func@50
9 models we track have a score here.
- 1 GPT-4o mini ↑1 96.3%
- 2 Claude 3.5 Sonnet (October 2024) ↑2 94.7%
- 3
Llama 3.1-405B ↑4 93.5%
- 4 GPT-4o Aug 2024 ↓3 93.5%
- 5
Llama 3.1-70B 92.4%
- 6
Llama 3.1-8B ↑3 88.3%
- 7
Gemini 1.5 Flash Sep 2024 ↑1 88.3%
- 8 Claude 3.5 Haiku ↓5 88.3%
- 9
Gemini 1.5 Pro Sep 2024 ↓3 87.6%
func-sec@1
9 models we track have a score here.
- 1 GPT-4o Aug 2024 50.2%
- 2 GPT-4o mini 48.2%
- 3 Claude 3.5 Haiku 47.1%
- 4 Claude 3.5 Sonnet (October 2024) 46.7%
- 5
Llama 3.1-70B 39.6%
- 6
Gemini 1.5 Pro Sep 2024 38.1%
- 7
Llama 3.1-405B 36.2%
- 8
Gemini 1.5 Flash Sep 2024 36.1%
- 9
Llama 3.1-8B 26.5%
func-sec@10
9 models we track have a score here.
- 1 Claude 3.5 Haiku ↑2 66.3%
- 2 GPT-4o Aug 2024 ↓1 65.3%
- 3 GPT-4o mini ↓1 64.1%
- 4 Claude 3.5 Sonnet (October 2024) 59.2%
- 5
Llama 3.1-405B ↑2 53.7%
- 6
Llama 3.1-70B ↓1 53.5%
- 7
Gemini 1.5 Pro Sep 2024 ↓1 53.1%
- 8
Gemini 1.5 Flash Sep 2024 49%
- 9
Llama 3.1-8B 48.7%
func-sec@50
9 models we track have a score here.
- 1 Claude 3.5 Haiku ↑2 72.6%
- 2 GPT-4o mini 72.2%
- 3 GPT-4o Aug 2024 ↓2 70.7%
- 4
Llama 3.1-70B ↑1 65.8%
- 5
Llama 3.1-405B ↑2 64.4%
- 6 Claude 3.5 Sonnet (October 2024) ↓2 63.6%
- 7
Llama 3.1-8B ↑2 60.3%
- 8
Gemini 1.5 Pro Sep 2024 ↓2 59.4%
- 9
Gemini 1.5 Flash Sep 2024 ↓1 54.6%
Everything the board measures
The benchmark’s paper publishes 7 numbers for each entry: the headline score and 6 parts of the test. Rank entries by any one, compare them all in the table, or plot any two. Each row is the entry’s best run on the headline score.
- Headline
- Headline score
- Parts
- func@1
- func@10
- func@50
- func-sec@1
- func-sec@10
- func-sec@50
- Headline
- Headline score
- Parts
- func@1
- func@10
- func@50
- func-sec@1
- func-sec@10
- func-sec@50
- Headline
- Headline score
- Parts
- func@1
- func@10
- func@50
- func-sec@1
- func-sec@10
- func-sec@50
- OpenAI
- Meta
- Google DeepMind
- Anthropic
- not in our model list
Scores at each effort level
Models the leaderboard ran at two or more effort levels. We don’t have enough cost data here to say what the extra effort costs.
Source: The CWEval paper
| Model | Effort | Harness | Score | Cost per task | Output tokens |
|---|---|---|---|---|---|
| GPT-4o Aug 2024 | Default, temperature 0.8 | 50.2% | |||
| GPT-4o mini | security instr., temperature 0.8 | 48.2% | |||
| Claude 3.5 Haiku | security instr., temperature 0.8 | 47.1% | |||
| Claude 3.5 Sonnet (October 2024) | Default, temperature 0.8 | 46.7% | |||
| GPT-4o mini | Default, temperature 0.8 | 44.5% | |||
| Claude 3.5 Haiku | Default, temperature 0.8 | 43.2% | |||
| Default, temperature 0.8 | 39.6% | ||||
| Default, temperature 0.8 | 38.1% | ||||
| security instr., temperature 0.8 | 36.9% | ||||
| Default, temperature 0.8 | 36.2% | ||||
| security instr., temperature 0.8 | 36.1% | ||||
| Default, temperature 0.8 | 35.3% | ||||
| Default, temperature 0.8 | 26.5% |
Scores at each effort level
Models the leaderboard ran at two or more effort levels. We don’t have enough cost data here to say what the extra effort costs.
Source: The CWEval paper
| Model | Effort | Harness | Score | Cost per task | Output tokens |
|---|---|---|---|---|---|
| GPT-4o Aug 2024 | Default, temperature 0.8 | 50.2% | |||
| GPT-4o mini | security instr., temperature 0.8 | 48.2% | |||
| Claude 3.5 Haiku | security instr., temperature 0.8 | 47.1% | |||
| Claude 3.5 Sonnet (October 2024) | Default, temperature 0.8 | 46.7% | |||
| GPT-4o mini | Default, temperature 0.8 | 44.5% | |||
| Claude 3.5 Haiku | Default, temperature 0.8 | 43.2% | |||
| Default, temperature 0.8 | 39.6% | ||||
| Default, temperature 0.8 | 38.1% | ||||
| security instr., temperature 0.8 | 36.9% | ||||
| Default, temperature 0.8 | 36.2% | ||||
| security instr., temperature 0.8 | 36.1% | ||||
| Default, temperature 0.8 | 35.3% | ||||
| Default, temperature 0.8 | 26.5% |
Number one over time 2 models have held number one with claims included since its release in January 2025
Lab claims count from the day the card came out, independent runs from the model’s release.
Source: The CWEval paper
Scores over time
All the scores we have, one dot each, so a model tested at several settings appears more than once.
Sources: Official CWEval leaderboard and labs’ model cards
Labs report it only in system cards
We read the headline results of 546 launch posts from 59 labs, and none of them list this benchmark. Some system cards do, below.
One system card reports it
Besides launch posts, we read the system cards, model cards and technical reports labs publish with a release. They report far more, including safety and frontier-risk tests.
| Date | Document | Score | As the document writes it | Section |
|---|---|---|---|---|
| Feb 28, 2026 | | 56.3 | CWEval func-sec@1, n=10 at temperature 0.8. func@1 80.17 (Table 16) | Cyber risk |
More in Cybersecurity
- ExploitGym In use 869 real-vulnerability exploit-development tasks (userspace, V8, Linux kernel). Success means capturing a flag through the intended vulnerability. GPT-6 Astra 42.4%
- ExploitBench In use 41 recent V8 JavaScript-engine N-day vulnerabilities. Progress measured by 16 grader-verified capability flags across five tiers. GPT-6 Astra 100%
- ExploitBench - Internal Port In use Agents develop working exploits for recently disclosed vulnerabilities to limit contamination. Scored as arbitrary code execution success rate. GPT-6.2 Astra 53.5%
- Atomic Challenges In use Agents solve 22 skill-level offensive security challenges in vulnerability research, network attack simulation and evasion. Scored as challenges solved. GPT-6 Astra 90.9%
- MiMo Cyber Bench In use Agents do in-house cybersecurity tasks that add to public vulnerability reproduction and exploitation benchmarks. The report gives no task count or grading details. MiMo-V2.6 Pro 81.7%
- PatchBench (OpenAI) In use Models patch security flaws. Automated tests and model-based review check that each patch fixes the flaw, keeps the intended behavior and is ready to merge. GPT-6.2 Astra 79.7%
Data audit
9 of 10 checks pass, 1 warning. Look first at the Newest score check. The newest came 9 months ago, in February 2026, for Qwen3-Coder-Next. Every benchmark
Catalog record 2 pass
- Pass Task access All tasks are public.
- Pass Confidence Checked against a primary source.
Scores 1 warning 3 pass 1 note
- Pass Independent runs Scores from the benchmark’s paper (10 entries) and system cards (1 score).
- Pass Models scored 10 models we track, plus 1 other entry on its leaderboard.
- Warning Newest score The newest came 9 months ago, in February 2026, for Qwen3-Coder-Next.
- Note Frontier models None of the top 10 has a score. The strongest tested is Claude 3.5 Sonnet (October 2024) (#151).
- Pass Headroom The best is 56.3%, under 85%, so it still separates models.
Leaderboard import 3 pass
- Pass Importer We read the board on arxiv.org: 13 rows for models we track and 1 other entry at the last read.
- Pass Last read November 20th, 2026.
- Pass Read worked The last read worked.
Consistency 1 pass 2 notes
- Note Lab claims No model has both a lab number and an independent run.
- Pass Known issues No published audit found problems.
- Note Epoch AI review Epoch AI hasn’t reviewed it.