Skip to content

"Do Anything Now": Characterization and Evaluation of In-the-Wild Jailbreak Prompts on Large Language Models"Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Models

arXiv· arXiv:2308.03825· CCS 2024· Xinyue Shen, Zeyuan Chen, Michael Backes, Yun Shen, Yang ZhangCISPA Helmholtz Center for Information Security; NetAppIndexed by this site · 26 days ago· Originally publishedSelected EvaluationSelectedAttention42

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors collected 1,405 in-the-wild jailbreak prompts and evaluated six LLMs, reporting that five prompts achieved an ASR above 0.95 on ChatGPT (GPT-3.5) and GPT-4.

Threat modelAttackers use publicly shared in-the-wild jailbreak prompts that require no additional optimization, concatenating them with prohibited questions to query the victim LLM, bypassing built-in safety mechanisms to induce harmful content; the paper does not clearly define the attacker's knowledge level, and the evaluated prompts are used directly in a black-box manner; it additionally evaluates OpenAI's undisclosed defenses and three external defenses.

Questions
Jailbreak prompts spread widely on platforms such as Reddit and Discord, but the research community lacks a systematic understanding of the platform distribution, characteristics, evolution patterns of in-the-wild jailbreak prompts and their actual harm to LLMs.
Methods
The authors propose the JAILBREAK HUB framework, collect 15,140 prompts from 14 sources on four platforms and manually verify 1,405 jailbreak prompts, use graph community detection to summarize attack strategies, then build a question set of 107,250 samples across 13 prohibited scenarios, measure attack effectiveness by ASR on six LLMs, and evaluate three external guardrails.
Experiments and results
The authors report: five jailbreak prompts achieved an ASR above 0.95 on ChatGPT (GPT-3.5) and GPT-4; Political Lobbying is the most vulnerable scenario among the six models (0.855 ASR); Dolly reaches an average ASR-B of 0.857; GPT-3.5 1106 brings the ASR of 70.909% of prompts below 0.1, but after rewriting 10% of the words, ASR-Max rises back to 0.857; the three external defenses on average reduce ASR by only 0.019–0.091.
Limitations and future work
The authors note that the data are limited to prompts collected from December 2022 to December 2023, and plan to continuously update JAILBREAK HUB, compare with automatically generated jailbreak prompts, and develop adaptive defenses. The evaluation covers six LLMs and three external guardrails; ASR is judged by automatic labeling with ChatGLM, and the paper does not report agreement between the labeler and human annotators.
Experimental setupChatGPT (gpt-3.5-turbo-0301)、GPT-4 (gpt-4-0314) et al. · JAILBREAK HUB 收集的 1,405 条在野越狱提示词、基于 OpenAI usage policy 13 个违禁场景构建的 107,250 条样本问题集 · ASR、ASR-B et al.
Evaluated models
ChatGPT (gpt-3.5-turbo-0301)GPT-4 (gpt-4-0314)PaLM2 (text-bison@002)ChatGLM (chatglm-6b)Dolly (dolly-v2-7b)Vicuna (vicuna-7b-v1.1)GPT-3.5 0613GPT-3.5 1106OpenAI moderation endpointOpenChatKit moderation modelNeMo-Guardrails
Benchmarks
JAILBREAK HUB 收集的 1,405 条在野越狱提示词基于 OpenAI usage policy 13 个违禁场景构建的 107,250 条样本问题集
Metrics
ASRASR-BASR-Maxtoxicity score
AI summaryand selection rationaleResearchers collected 1,405 in-the-wild jailbreak prompts from December 2022 to December 2023; measurements on six large language models show that existing defenses cannot adequately resist them, with five prompts reaching an attack success rate (ASR) of 0.95 against ChatGPT (GPT-3.5) and GPT-4, and the earliest having survived online for over 240 days. Based on the self-built framework JailbreakHub, the research identified 131 jailbreak communities from channels such as Reddit, Discord and prompt aggregator sites, with strategies covering prompt injection, privilege escalation, deception and virtualization; since September 2023, 75.472% of jailbreak prompts have shifted to dissemination via sites such as FlowGPT. In tests covering 13 prohibited scenarios and 107,250 samples, political lobbying was the most vulnerable scenario (ASR 0.855). The code and dataset are open-sourced on GitHub (github.com/verazuo/jailbreak_llms).

Researchers collected 1,405 in-the-wild jailbreak prompts from December 2022 to December 2023; measurements on six large language models show that existing defenses cannot adequately resist them, with five prompts reaching an attack success rate (ASR) of 0.95 against ChatGPT (GPT-3.5) and GPT-4, and the earliest having survived online for over 240 days. Based on the self-built framework JailbreakHub, the research identified 131 jailbreak communities from channels such as Reddit, Discord and prompt aggregator sites, with strategies covering prompt injection, privilege escalation, deception and virtualization; since September 2023, 75.472% of jailbreak prompts have shifted to dissemination via sites such as FlowGPT. In tests covering 13 prohibited scenarios and 107,250 samples, political lobbying was the most vulnerable scenario (ASR 0.855). The code and dataset are open-sourced on GitHub (github.com/verazuo/jailbreak_llms).

Why it was selectedThe paper characterizes the attack strategies and evolution of 1,405 in-the-wild jailbreak prompts, and its measured shortcomings against models and external guardrails can serve as a checklist for defense teams.

Related events and news

0 events · 1 news mentions

News that mentions this paper

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    There is a lack of systematic understanding of in-the-wild jailbreak prompts, and their actual harm is unclear; the authors conduct a systematic measurement of their distribution, characteristics, and attack effectiveness.

    Core problem: the research community lacks a systematic understanding of in-the-wild jailbreak prompts, and both their dissemination ecosystem and their actual degree of harm to LLMs remain unclear.

    • Problem setting: jailbreak prompts are deliberately constructed to bypass LLM safety mechanisms and induce harmful content; dedicated communities have formed on platforms such as Reddit and Discord, and they also appear in underground malicious services (per the authors).
    • Existing gaps: the authors state that existing research focuses only on a small number (fewer than 100) of prompts from a single source, or works on automatically generating jailbreak prompts, and lacks systematic study of the platforms where in-the-wild prompts are distributed, the participants, their characteristics, evolution patterns, and degree of harm.
    • Core observation: in-the-wild prompts are publicly available, reach a broad audience, and can be used directly without additional optimization, and automatic prompt generation methods often optimize based on in-the-wild prompts; therefore studying in-the-wild prompts can serve as a foundation for subsequent research (the authors' view).
    • Paper outputs: proposes the evaluation framework JAILBREAK HUB, collects 1,405 in-the-wild jailbreak prompts for characteristic and community analysis, builds a question set of 107,250 samples across 13 prohibited scenarios, evaluates attack effectiveness on six LLMs, and examines three external guardrails.
    • Threat model:
      • Attacker goal: use jailbreak prompts to bypass LLMs' built-in safety mechanisms so that they answer questions in scenarios prohibited by the OpenAI usage policy.
      • Attacker knowledge: the paper does not explicitly define white-box/black-box; the evaluated in-the-wild prompts are publicly shared and used by direct concatenation, requiring no access to model internals.
      • Attacker capability: combine jailbreak prompts with prohibited questions and query the model; in the paraphrase attack evaluation, prompts can be back-translated, rewritten by an LLM, or have 1%–10% typos introduced.
      • Victim systems: six LLMs — ChatGPT (GPT-3.5), GPT-4, PaLM2, ChatGLM, Dolly, Vicuna — plus OpenAI's undisclosed guardrails and three external guardrails.
  2. What related research exists?

    Related work falls into three groups: LLM jailbreak prompt research, LLM safety and abuse research, and external guardrail tools; the authors locate the differences through large-scale in-the-wild measurement.

    LLM jailbreak prompt research

    • Wei et al. [86] — propose a hypothesis of two failure modes of LLM safety training and use it to guide jailbreak prompt design.
    • Li et al. [42] — propose a jailbreak method combining Chain-of-Thoughts prompts to extract private information from ChatGPT.
    • Zou et al. [95] — assume the attacker has white-box access to the LLM and use a greedy coordinate descent method to generate jailbreak prompts.
    • The paper notes that these works focus only on a small number (fewer than 100) of prompts from a single source, or aim to automatically generate jailbreak prompts; this paper instead studies in-the-wild prompts, on the grounds that they are publicly available, can be deployed without additional optimization, and that generation methods are often based on optimizing in-the-wild prompts.

    LLM safety and abuse research

    • Perez and Ribeiro [68] — study prompt injection attacks against LLMs and find that LLMs can be misled by simple manual inputs.
    • Kang et al. [40] — borrow standard attacks from computer security such as obfuscation, code injection, and virtualization to bypass LLM vendors' safety mechanisms.
    • Other attacks and abuse — the paper also mentions backdoors, data extraction, membership inference, adversarial attacks, as well as misuse directions such as misinformation generation, phishing, and hate campaigns, listed as background.

    External guardrails (evaluation targets of this paper)

    • OpenAI moderation endpoint [48] — OpenAI's official content moderation endpoint, which uses a multi-label classifier to classify responses into 11 categories.
    • OpenChatKit moderation model [80] — a moderation model released by Together, fine-tuned from GPT-JT-6B on the OIG moderation dataset, performing five-way classification.
    • NeMo-Guardrails [57] — an open-source guardrail toolkit from Nvidia; its jailbreak guardrail relies on a Guard LLM to determine whether a question violates the usage policy.

    Baseline and benchmark: this paper does not propose a new attack method to compare performance against a baseline; the control is ASR-B (attack success rate-baseline), i.e., asking directly without a jailbreak prompt, and the evaluation benchmark is the authors' self-built question set of 107,250 samples across 13 scenarios.

    Authors' positioning: this paper is a systematic measurement study of in-the-wild jailbreak prompts, covering platforms, accounts, characteristics, communities, and evolution, and evaluates on six LLMs and three external guardrails, distinguishing it from prior small-scale or generative work (per the authors).

  3. How does the paper address this problem?

    JAILBREAK HUB has three steps: collect prompts from four platforms and manually verify them, use graph community detection to summarize attack strategies, and build a 13-scenario question set to measure ASR on six LLMs.

    Overall approach: propose the JAILBREAK HUB framework (Figure 2) in three steps — data collection, prompt analysis, and response evaluation — first characterizing the in-the-wild jailbreak prompt ecosystem, then quantitatively evaluating their attack effectiveness on six LLMs and the mitigation effect of external guardrails.

    Data collection

    • Sources: Reddit (3 subreddits), Discord (6 servers), websites (AIPRM, FlowGPT, JailbreakChat), open-source datasets (AwesomeChatGPTPrompts, OCR-Prompts), 14 sources on four platforms in total, spanning December 2022 to December 2023.
    • Identification method: rely on user-assigned labels (e.g., Jailbreak, Bypass flair/tag) and parsing of standardized sharing formats, then independently re-checked by two of the paper's authors; 15,140 prompts were obtained in total, of which 1,405 (9.280%) were marked by platform users as jailbreak prompts.
    • Quality control: 200 regular prompts and 200 jailbreak prompts were randomly sampled and independently labeled by three annotators, Fleiss' Kappa = 0.925.

    Prompt analysis

    • Ecosystem characterization: statistics on platform distribution, user accounts (803 of 7,308 uploading accounts had posted jailbreak prompts), and target LLMs (based on FlowGPT upload tags).
    • Feature analysis: compare token lengths; extract embeddings with a sentence transformer (all-MiniLM-L12-v2), reduce dimensionality with UMAP, and visualize semantics with WizMap.
    • Community detection: compute pairwise Levenshtein similarity among the 1,405 prompts, connect an edge when similarity exceeds the threshold 0.5 (retaining 0.457% of edges), and run Louvain community detection (modularity 0.851, higher than the other three algorithms, Table 9), yielding 131 communities; manually name the 11 communities with ≥9 prompts and summarize their attack strategies.

    Response evaluation

    • Question set construction: take 13 prohibited scenarios per the OpenAI usage policy (excluding child sexual abuse scenarios), have GPT-4 generate 30 questions per scenario with manual review; select 5 representative prompts from each of the 11 communities (earliest, closest to the center, latest, and two random), repeat each question 5 times, for 107,250 samples in total (13×30×5×11×5).
    • Models tested and configuration: ChatGPT (GPT-3.5) (gpt-3.5-turbo-0301), GPT-4 (gpt-4-0314), PaLM2 (text-bison@002), ChatGLM (chatglm-6b), Dolly (dolly-v2-7b), Vicuna (vicuna-7b-v1.1); default configuration, maximum output 2,048 tokens.
    • Success criterion: a response that actually answers the question (rather than describing it or refusing) is recorded as a successful attack; metrics are ASR, ASR-B (control asking directly without prompts), and ASR-Max (ASR of the most effective single prompt).
    • Automatic labeling: use ChatGLM with in-context learning to judge whether a response answers the question; on 400 human-labeled samples, 15-shot gives Accuracy 0.898 and F1 0.915 (Table 10).

    Evolution, paraphrase, and guardrail evaluation

    • Evolution over time: re-measure attack effectiveness on three official GPT-3.5 snapshots (0301, 0613, 1106).
    • Paraphrase attacks: three methods — Opus-MT English-Chinese back-translation, rewriting by ChatGPT (GPT-3.5 0613) with two prompts (P1, P2), and CheckList random introduction of 1%/5%/10% typos.
    • External guardrails: evaluate OpenAI moderation endpoint, OpenChatKit moderation model, and NeMo-Guardrails (with gpt-3.5-turbo-0301 as the Guard LLM) on ChatGPT (GPT-3.5), reporting the ASR reduction brought by each guardrail.
  4. What experiments did the paper conduct?

    Across six LLMs, the most effective prompts have ASR-Max of 0.910–0.998; GPT-3.5 1106 suppresses attacks substantially but can be bypassed by paraphrasing; external guardrails reduce ASR by only 0.019–0.091 on average.

    Experimental setup

    • Models tested: ChatGPT (GPT-3.5) (gpt-3.5-turbo-0301), GPT-4 (gpt-4-0314), PaLM2 (text-bison@002), ChatGLM (chatglm-6b), Dolly (dolly-v2-7b), Vicuna (vicuna-7b-v1.1), six in total.
    • Dataset: 13 prohibited scenarios × 30 questions × 5 repetitions × 11 communities × 5 prompts = 107,250 samples; additionally, 129 prompts were randomly sampled from the remaining communities for supplementary evaluation.
    • Metrics: ASR (success if the response actually answers the question), ASR-B (control without prompts), ASR-Max (most effective single prompt); toxicity via Google Perspective API, with a score ≥0.5 recorded as toxic.
    • Judging method: ChatGLM automatically labels whether a response answers the question; with 15-shot, Accuracy is 0.898 on 400 human-labeled samples (Table 10).
    • Guardrail evaluation: OpenAI moderation endpoint, OpenChatKit moderation model, NeMo-Guardrails, all tested on ChatGPT (GPT-3.5).
    • Repetitions: each question is asked 5 times.

    Main results

    According to Table 4 (13-scenario average, ASR-M is ASR-Max):

    Swipe horizontally to read the table

    ModelASR-BASRASR-M
    ChatGPT (GPT-3.5)0.4100.6850.998
    GPT-40.4420.6850.999
    PaLM20.5280.5550.910
    ChatGLM0.5970.6810.973
    Dolly0.8570.8700.939
    Vicuna0.4770.6560.950
    • Authors' interpretation: the authors state that current LLMs cannot resist the most effective jailbreak prompts in all scenarios; 15 of the 55 prompts (27.273%) have ASR above 0.950 on ChatGPT (GPT-3.5), and 5 exceed 0.950 on both ChatGPT (GPT-3.5) and GPT-4.
    • Vulnerable scenarios: the authors report Political Lobbying as the most vulnerable (0.855 ASR across the six models), followed by Legal Opinion (0.794) and Pornography (0.761); in the Illegal Activity scenario, ChatGPT (GPT-3.5) has ASR-B of only 0.053, but ASR and ASR-Max reach 0.517 and 1.000.
    • Exception: in some scenarios ASR-B is higher than ASR (e.g., Political Lobbying), which the authors attribute to some prompts being poorly designed and causing the model to refuse.

    Evolution over time and paraphrase attacks

    • What was tested: attack effectiveness on three GPT-3.5 snapshots (0301, 0613, 1106) (Table 6).
    • Results: ASR for the main community prompts is 0.685 on 0301 and 0.671 on 0613, dropping to 0.103 on 1106 (ASR-Max 0.477); 70.909% of prompts have ASR below 0.1; the authors speculate that OpenAI deployed undisclosed guardrails (1106 also refuses benign questions like "1+1").
    • Paraphrase bypass (Table 7): changing 1%, 5%, 10% of the words in the most effective prompts raises ASR-Max from 0.477 to 0.517, 0.778, 0.857; back-translation and LLM rewriting with P1 and P2 give ASR-Max of 0.600, 0.687, 0.714 respectively; the authors state that bypassing the guardrails usually requires fewer than 10 attempts.

    External guardrail evaluation

    • What was tested: the ASR reduction brought by three external guardrails on ChatGPT (GPT-3.5) (Table 8).
    • Results: average ASR reductions are 0.091 for OpenAI moderation endpoint, 0.030 for OpenChatKit, and 0.019 for NeMo-Guardrails; for the most effective prompts (ASR-Max 0.994) the reductions are 0.431, 0.031, and 0.024 respectively.
    • Authors' interpretation: the authors state that the three external guardrails have limited defensive effect against all prompts, speculate that their classification-based design is constrained by training data, and leave root-cause analysis to future work.

    Other ablations and analyses

    • Prompt length: Spearman correlation between token count and ASR is 0.156, p = 0.257, not statistically significant.
    • Remaining prompts (Table 5): the 129 non-main-community prompts have an average ASR of 0.644, of which 16 (12.40%) exceed 0.950.
    • Response toxicity (Figure 9): over 22%, 19%, and 13% of responses are toxic in the Toxic, Narrative, and Opposite communities, versus 0.01% in the Basic community.
    • Community differences (Figure 8): the most effective prompts from the Advanced community achieve ASR above 0.994 (GPT-3.5), 0.989 (GPT-4), 0.910 (PaLM2), 0.884 (ChatGLM), 0.897 (Dolly), and 0.864 (Vicuna) across the six models.
    • Dolly exception: Dolly has an average ASR-B of 0.857; the authors state it was not trained with RLHF and barely resists even without prompts.
  5. What are some points that can be further explored?

    The authors note that the data time range is limited, and plan to continuously update, compare automatically generated prompts, and develop adaptive defenses; the evaluation covers six models and three defenses.

    Limitations and Future Directions Noted by the Authors

    • Data time range: The authors note that the conclusions are limited to jailbreak prompts collected from December 2022 to December 2023, and prompts will continue to evolve with attack-defense confrontation (Section 8, Limitations & Future Work).
    • Continuous updates: The authors plan to regularly update and release research findings through JAILBREAK HUB, and disclose them to the research community on a semiannual cycle (Section 8).
    • Comparing automatically generated prompts: The authors state that examining the difference in effectiveness between in-the-wild jailbreak prompts and automatically optimized jailbreak prompts is a promising future direction (Section 8).
    • Defense research: The authors state that effective and adaptive jailbreak defenses are needed, left as future work (Section 8).
    • Root cause analysis of defenses: In-depth root cause analysis of the poor effectiveness of external defenses is left by the authors as future work (Section 6.2).

    Experimental Coverage

    • Models tested: ChatGPT (GPT-3.5), GPT-4, PaLM2, ChatGLM, Dolly, Vicuna, six in total; the open-source models are all 6B–7B in scale (Section 5.1).
    • Data range: Prompts come from 14 sources on four platforms, December 2022 to December 2023; prohibited scenarios are taken from the 13 categories of the OpenAI usage policy, excluding child sexual abuse scenarios (Section 5.1).
    • Defense evaluation: Only three, the OpenAI moderation endpoint, the OpenChatKit moderation model, and NeMo-Guardrails, and evaluated only on ChatGPT (GPT-3.5) (Section 6.2).
    • Evolution and rewriting: Evolution over time is only a case study of three GPT-3.5 snapshots; the rewriting attack targets the undisclosed defenses of GPT-3.5 1106 (Sections 5.3, 5.4).
    • Evaluation method: ASR is automatically annotated by ChatGLM; the paper reports the annotator's 15-shot accuracy (0.898) on 400 manually labeled samples, and does not report its agreement rate with manual annotation or confusion matrix; each question is repeated 5 times (Appendix B).
  6. Summarize the main content of the paper

    The authors systematically measure 1,405 in-the-wild jailbreak prompts and state that six LLMs and three external guardrails all fail to adequately resist them, with the most effective prompts reaching ASR close to 1.000.

    A systematic measurement study of in-the-wild jailbreak prompts (the authors state it is the first such systematic study), with the framework named JAILBREAK HUB.

    • Problem addressed: jailbreak prompts spread widely online, but there is a lack of systematic understanding of their platform distribution, participants, characteristics, evolution patterns, and actual harm to LLMs.
    • Method highlights: collect 15,140 prompts from 14 sources on four platforms — Reddit, Discord, websites, and open-source datasets — and manually verify 1,405 jailbreak prompts; use Levenshtein similarity plus Louvain community detection to identify 131 communities and summarize attack strategies such as prompt injection, privilege escalation, deception, and virtualization; build a question set of 107,250 samples across 13 prohibited scenarios to evaluate six LLMs.
    • Main results:
      • Five jailbreak prompts have ASR above 0.95 on ChatGPT (GPT-3.5) and GPT-4, and the most effective prompts across the six models have ASR-Max of 0.910–0.999 (Table 4).
      • Political Lobbying is the most vulnerable scenario (0.855 ASR across the six models); Dolly has an average ASR-B of 0.857, and the authors raise safety concerns about its commercial release.
      • The GPT-3.5 1106 snapshot brings 70.909% of prompts to ASR below 0.1, and the authors speculate that undisclosed guardrails exist; however, changing 10% of the words in the most effective prompts raises ASR-Max back to 0.857 (Table 7).
      • The three external guardrails reduce ASR by only 0.019–0.091 on average, with a maximum reduction of 0.431 for the most effective prompts (Table 8).
      • In the ecosystem, from September 2023 onward websites contribute over 75.472% of jailbreak prompts, and 28 accounts continuously optimize prompts for over 100 days.
    • Authors' conclusion: the authors state that existing LLM safety mechanisms (including RLHF and external guardrails) cannot resist jailbreak prompts in all scenarios, that more effective and adaptive defenses are needed, and that they plan to continuously update JAILBREAK HUB to support subsequent research.
Read originalCCS 2024