[Paper Review] CyberSecEval 2: A Wide-Ranging Cybersecurity Evaluation Suite for Large Language Models
CyberSecEval 2 introduces new prompt injection and code interpreter abuse tests, evaluates multiple SOTA LLMs, and quantifies safety-utility tradeoffs and exploitation capabilities with open-source benchmarks for assessing LLM security risks and cyber exploitation tasks.
Large language models (LLMs) introduce new security risks, but there are few comprehensive evaluation suites to measure and reduce these risks. We present BenchmarkName, a novel benchmark to quantify LLM security risks and capabilities. We introduce two new areas for testing: prompt injection and code interpreter abuse. We evaluated multiple state-of-the-art (SOTA) LLMs, including GPT-4, Mistral, Meta Llama 3 70B-Instruct, and Code Llama. Our results show that conditioning away risk of attack remains an unsolved problem; for example, all tested models showed between 26% and 41% successful prompt injection tests. We further introduce the safety-utility tradeoff: conditioning an LLM to reject unsafe prompts can cause the LLM to falsely reject answering benign prompts, which lowers utility. We propose quantifying this tradeoff using False Refusal Rate (FRR). As an illustration, we introduce a novel test set to quantify FRR for cyberattack helpfulness risk. We find many LLMs able to successfully comply with "borderline" benign requests while still rejecting most unsafe requests. Finally, we quantify the utility of LLMs for automating a core cybersecurity task, that of exploiting software vulnerabilities. This is important because the offensive capabilities of LLMs are of intense interest; we quantify this by creating novel test sets for four representative problems. We find that models with coding capabilities perform better than those without, but that further work is needed for LLMs to become proficient at exploit generation. Our code is open source and can be used to evaluate other LLMs.
Motivation & Objective
- Quantify LLM security risks and capabilities in cybersecurity contexts.
- Extend CyberSecEval with new prompt injection and code interpreter abuse test suites.
- Evaluate state-of-the-art LLMs on cyberattack helpfulness and exploitation tasks.
- Introduce the False Refusal Rate (FRR) metric to analyze safety-utility tradeoffs.
- Provide open-source tools to evaluate LLMs on cybersecurity risks and exploitation tasks.
Proposed method
- Introduce two new evaluation areas: prompt injection and code interpreter abuse.
- Develop 15 prompt injection attack categories and 5 code-interpreter abuse categories with judge-based evaluation.
- Create a vulnerability exploitation test suite with generation of random C/JavaScript/Python and SQL challenges.
- Use a judge LLM to assess compliance with malicious prompts without executing real code in a sandbox.
- Define and compute the False Refusal Rate (FRR) to measure benign prompt refusals vs. harmful prompts.
- Apply CyberSecEval 2 to LLM families including Llama, CodeLlama, GPT-4, and Gemini in case studies.

Experimental results
Research questions
- RQ1How vulnerable are current LLMs to prompt injection attacks and code-interpreter abuse?
- RQ2What is the safety-utility tradeoff when conditioning LLMs to reject unsafe cybersecurity prompts (FRR)?
- RQ3How proficient are LLMs at generating or exploiting vulnerabilities in code across languages (C, Python, JavaScript) and SQL?
- RQ4Do higher coding abilities in LLMs correlate with better exploitation performance, and what are the limits?
- RQ5How do new evaluation categories compare across model families (Llama, CodeLlama, GPT-4, Gemini) in terms of compliance and non-compliance with risky prompts?
Key findings
- All tested models showed 26% to 41% success on prompt injection tests, indicating unresolved prompt- injection risk.
- Conditioning LLMs to reject unsafe prompts reduces risk but can increase False Refusal Rate (FRR) and reduce utility.
- Non-compliance to cyberattack prompts increased when prompts seemed plausibly benign, with notable improvement in newer models’ refusals.
- Code-interpreter abuse tests show models complied with 13% to 47% of dangerous interpreter prompts depending on category.
- Exploitation tests reveal that models with broader coding capabilities perform better on vulnerability exploitation tasks, but no model fully masters exploit generation yet.
- FRR-rich evaluation demonstrates a tradeoff between usefulness for benign cybersecurity-related tasks and protection against cyberattacks.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.