LMVD-ID: d8228765
Published January 1, 2025

Evolutionary LLM Jailbreak

Affected Models:gpt-4, claude 2, gemini, llama, vicuna, gemma 2, gpt-3.5-turbo, gpt-4o, llama-3.1-70b, llama-3.1-8b, llama-2-13b-cls, claude-3.5-haiku, gpt-3.5

Research Paper

LLM-Virus: Evolutionary Jailbreak Attack on Large Language Models

View Paper

Description: This vulnerability allows an attacker to bypass the safety mechanisms of Large Language Models (LLMs) by using an evolutionary algorithm to generate effective jailbreak prompts. The algorithm leverages the LLM's capabilities to iteratively refine prompts, increasing the likelihood of eliciting harmful responses to otherwise disallowed queries.

Examples: See https://github.com/Ymm-cll/LLM-Virus. The repository contains the LLM-Virus code and examples of generated jailbreak prompts.

Impact: Successful exploitation allows attackers to circumvent LLM safety restrictions, leading to the generation of harmful content, including but not limited to:

  • Instructions for illegal activities.
  • The spread of misinformation and propaganda.
  • Personal data breaches.
  • Generation of biased or offensive content.

Affected Systems: A wide range of LLMs are vulnerable, including both closed-source models (e.g., GPT series, Claude, Gemini) and open-source models (e.g., Llama, Vicuna, Gemma). The vulnerability's effectiveness depends on the specific safety mechanisms implemented by the model.

Mitigation Steps:

  • Implement robust prompt filtering and classification mechanisms that can identify and block adversarial prompts. This should incorporate detection of various prompt patterns and techniques used in the evolutionary algorithm.
  • Improve the LLM's ability to discriminate between legitimate and harmful requests.
  • Develop and integrate more sophisticated safety alignment techniques during the model's training.
  • Regularly update and refine safety models to stay ahead of evolving attack techniques. Utilize adversarial training incorporating the techniques detailed in the research paper.
  • Employ advanced detection methods beyond keyword blocking, including techniques based on model behaviour analysis and contextual understanding.

© 2025 Promptfoo. All rights reserved.