RedCode
Models meet adversarial prompts to generate or run harmful code. Generation is model-judged and execution is checked in a container.
Over 4,000 test cases in two parts. RedCode-Exec has 4,050 instances over 25 vulnerability types in Python, Bash and natural language, run in a Docker sandbox. RedCode-Gen has 160 prompts with function signatures over 8 malware families. NeurIPS 2024 Datasets and Benchmarks track.
In the authors’ words
With the rapidly increasing capabilities and adoption of code agents for AI-assisted coding, safety concerns, such as generating or executing risky code, have become significant barriers to the real-world deployment of these agents. To provide comprehensive and practical evaluations on the safety of code agents, we propose RedCode, a benchmark for risky code execution and generation: (1) RedCode-Exec provides challenging prompts that could lead to risky code execution, aiming to evaluate code agents' ability to recognize and handle unsafe code. We provide a total of 4,050 risky test cases in Python and Bash tasks with diverse input formats including code snippets and natural text. They covers 25 types of critical vulnerabilities spanning 8 domains (e.g., websites, file systems). We provide Docker environments and design corresponding evaluation metrics to assess their execution results. (2) RedCode-Gen provides 160 prompts with function signatures and docstrings as input to assess whether code agents will follow instructions to generate harmful code or software. Our empirical findings, derived from evaluating three agent frameworks based on 19 LLMs, provide insights into code agents' vulnerabilities. For instance, evaluations on RedCode-Exec show that agents are more likely to reject executing risky operations on the operating system, but are less likely to reject executing technically buggy code, indicating high risks. Risky operations described in natural text lead to a lower rejection rate than those in code format. Additionally, evaluations on RedCode-Gen show that more capable base models and agents with stronger overall coding abilities, such as GPT4, tend to produce more sophisticated and effective harmful software. Our findings highlight the need for stringent safety evaluations for diverse code agents. Our dataset and code are available at https://github.com/AI-secure/RedCode.
- Level
- Expert Specialists with years of training, often over hours of work
- Scored
- Graded by a model A language model scores each response, usually against a rubric.
- Answers
- Agent task Many steps in a terminal, browser, desktop, app, game or robot.
Muse Spark 1.3 leads with 6.00%
Best score per model as labs report them in their own cards. Labs pick their own settings, so these compare less cleanly than independent runs.
- 1
Muse Spark 1.3 6.00%
- 2
Muse Wonder Full 8.00%
- 3
Muse Spark 1.1 12%
| # | Model | Score | Setting | Date | Source |
|---|---|---|---|---|---|
| 1 | | 6.00% | Oct 2026 | Model card | |
| 2 | | 8.00% | Oct 2026 | Model card | |
| 3 | | 12% | Jul 2026 | Model card |
3 models have held number one since its release in Nov 2024
Lab claims count from the day the card came out, independent runs from the model’s release.
Scores over time
All the scores we have, one dot each, so a model tested at several settings appears more than once.
Labs report it only in system cards
We read the headline results of 479 launch posts from 51 labs, and none of them list this benchmark. Some system cards do, below.
3 system cards report it, from 1 lab
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 |
|---|---|---|---|---|
| 23 Oct 2026 | | 6 | RedCode ASR averaged over single-turn and multi-turn, Muse Spark 1.3 (API) (Figure 15) | Cyber risk |
| 12 Oct 2026 | | 8 | RedCode multi-turn ASR, lower is better (Cyber Robustness Evaluations table, section 4). Single turn 9.0 | Cyber risk |
| 9 Jul 2026 | | 12 | RedCode multi-turn ASR, Muse Spark 1.1 model-only (Figure 20 text). Single-turn 8.0. System 7.0 and 12.0 | 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%
- CWE-bench In use Agents audit a repository and write a patch for a security flaw, without being told where the bug is. Covers six programming languages.
Gemini 4 Carbon 71%
- Real-world vulnerability discovery In use Agents search popular open-source codebases to rediscover about 1,200 recent confirmed vulnerabilities across many languages. Reports share discovered.
Gemini 4 Argon 86%
- Artificial Analysis Cyber Index In use Agents do enterprise cyber defense tasks from three benchmarks, CWE-Bench-AA, DeepsecBench-AA and CyberGym-E2E-AA, combined into one success rate.
Mistral Large 4 (Le Chonk, open weights) 51%
- Big Sleep Evaluation (Google) In use Agents search large real codebases such as Chrome and Safari for critical, hard to find vulnerabilities. Scored by pass@1 success rate, run without safety guardrails.
Gemini 3.5 Flash Cyber 72%