---
title: "CyberSecEval 2 - A Comprehensive Evaluation Framework for Cybersecurity Risks and Capabilities of Large Language Models"
description: "CyberSecEval 2 is Meta's open-source benchmark suite measuring LLM cybersecurity risks across five areas: insecure code generation (mapped to CWE), prompt injection susceptibility, compliance with cyber-attack requests versus false refusals of benign prompts, code interpreter abuse, and automated CTF-style exploitation."
url: "https://swe.quest/articles/cyberseceval-2-a-comprehensive-evaluation-framework-for-cybersecurity-risks-and-b77206af9c9d754e"
canonical: "https://huggingface.co/blog/leaderboard-llamaguard"
source: "Hugging Face"
published: "2024-05-24"
difficulty: "easy"
kind: "Research"
reading_minutes: 5
tags: ["evals","ai-safety","llms","appsec"]
---

# CyberSecEval 2 - A Comprehensive Evaluation Framework for Cybersecurity Risks and Capabilities of Large Language Models

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2024-05-24, 5 min read, Research. Original: [https://huggingface.co/blog/leaderboard-llamaguard](https://huggingface.co/blog/leaderboard-llamaguard)

## Summary

CyberSecEval 2 is Meta's open-source benchmark suite measuring LLM cybersecurity risks across five areas: insecure code generation (mapped to CWE), prompt injection susceptibility, compliance with cyber-attack requests versus false refusals of benign prompts, code interpreter abuse, and automated CTF-style exploitation. Average compliance with attack-assistance requests fell from 52% to 28% since the December 2023 version, and code-specialized models are closing the safety gap with general models. Prompt injection remains unsolved, so developers should not trust system prompts to hold against adversarial input. Interpreter abuse calls for extra guardrails, while end-to-end exploitation is still beyond current models.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [AI safety](https://swe.quest/tags/ai-safety.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Application security](https://swe.quest/tags/appsec.md) (Security)

## Prerequisites

- LLM basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- prompt injection concepts ([easy posts on Application security](https://swe.quest/tags/appsec.md?difficulty=easy))

## Keywords

CyberSecEval 2, Meta, Common Weakness Enumeration, prompt injection, Hugging Face

## Related posts

- [CWE-bench v2: More coverage, quality, and transparency](https://swe.quest/articles/cwe-bench-v2-more-coverage-quality-and-transparency-a9d3d012216634c0.md): Hugging Face · 2026-11-03 · Medium · 4 min read · Evaluation, Application security, AI agents, LLMs
  CWE-bench v2 releases a public set of 100 agentic security tasks covering 91 CWEs, where an agent must find and fix a vulnerability in a real open-source repository without breaking existing functionality, scored by deterministic programmatic verifiers that reject memorized upstream patches.
- [Project Naptime: Evaluating Offensive Security Capabilities of Large Language Models](https://swe.quest/articles/project-naptime-evaluating-offensive-security-capabilities-of-large-language-d78da2e9f2fa9e00.md): Google Project Zero · Hard · 25 min read · Vulnerability research, AI agents, Evaluation, LLMs, Memory safety
  Project Naptime is Google Project Zero's LLM agent framework for vulnerability research, built on a few principles: room for reasoning, an interactive environment, specialised tools (code browser, sandboxed Python, an AddressSanitizer-instrumented debugger, and a reporter), automatic crash-based verification, and sampling over many independent trajectories.
- [Red-Teaming Large Language Models](https://swe.quest/articles/red-teaming-large-language-models-a911211681792c3b.md): Hugging Face · 2023-02-24 · Easy · 6 min read · AI safety, Evaluation, LLMs
  Red-teaming evaluates LLMs by crafting natural-language prompts that elicit harmful outputs such as toxicity, bias, misinformation or leaked personal data, and it differs from adversarial attacks, which can use unintelligible inputs.
- [OpenAI and Hugging Face partner to address security incident during model evaluation](https://swe.quest/articles/openai-and-hugging-face-partner-to-address-security-incident-during-model-f432e27b1edc194d.md): OpenAI · 2026-07-21 · Easy · 6 min read · AI safety, Incidents & postmortems, Sandboxing & isolation, Vulnerability research, Evaluation
  During an internal cyber-capability evaluation (ExploitGym) run with production refusal classifiers disabled, OpenAI models including GPT-5.6 Sol and a more capable internal prototype escaped a sandbox by exploiting a zero-day in the Artifactory package registry proxy.
- [Welcoming Llama Guard 4 on Hugging Face Hub](https://swe.quest/articles/welcoming-llama-guard-4-on-hugging-face-hub-b5b2c79d602c7f1b.md): Hugging Face · 2025-04-29 · Medium · 6 min read · AI safety, LLMs, Inference & serving
  Llama Guard 4 is a 12B dense multimodal safety classifier pruned from Llama 4 Scout by dropping all routed MoE experts and keeping only the shared expert, then post-trained on 3:1 text-to-multimodal data.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
