Skip to main content
LLM Security Database
Skip to research details
Back to research findings
LMVD-ID: cd454ae4
Paper published November 1, 2023
Entry analyzed December 29, 2024
Paper-reported evidence
Confidence: Source-linked

The LMVD-ID is an internal research identifier, not an official CVE identifier.

Nested Prompt Jailbreak

A vulnerability exists in several Large Language Models (LLMs) allowing attackers to bypass safety mechanisms through carefully crafted "jailbreak" prompts. The vulnerability exploits the LLMs' susceptibility to prompt…

BibTeX citation

Paper-evaluated models(7)

Claude-instant-v1, Claude-v2, GPT-2 +4 more
  • Claude-instant-v1
  • Claude-v2
  • GPT-2
  • GPT-3.5 Turbo
  • GPT-4
  • Llama 2 13B Chat
  • Llama 2 7B Chat

Description

A vulnerability exists in several Large Language Models (LLMs) allowing attackers to bypass safety mechanisms through carefully crafted "jailbreak" prompts. The vulnerability exploits the LLMs' susceptibility to prompt rewriting and scenario nesting, allowing malicious prompts to elicit unsafe responses despite safety filters. This is achieved by modifying a harmful prompt's wording without changing its core meaning, and then embedding it within a seemingly innocuous task scenario (e.g., code completion, text continuation).

Examples

See https://github.com/NJUNLP/ReNeLLM (opens in a new tab). The paper provides numerous specific examples of initial prompts and their rewritten and nested variations that successfully bypass safety protocols in various LLMs. Examples include misspellings of keywords, paraphrasing, partial translation, and insertion of meaningless characters into the original harmful prompt, followed by nesting within a code completion task.

Impact

Successful exploitation allows attackers to circumvent safety restrictions implemented in LLMs, potentially leading to the generation of harmful content such as instructions for illegal activities, hate speech, or personally identifiable information. The impact depends on the specific LLM and its application, but may include reputational damage, legal liability, and safety risks.

Affected Systems

Multiple LLMs are affected, including but not limited to: GPT-3.5, GPT-4, Claude-1, Claude-2, and Llama 2. The vulnerability is not limited to specific model versions.

Mitigation Steps

  • Implement more robust prompt filtering mechanisms that are resilient to prompt rewriting and paraphrasing techniques.
  • Develop models that prioritize safety over usefulness in the face of potentially harmful prompts.
  • Employ multiple layers of defense, including both prompt-level filtering and response-level monitoring.
  • Regularly update and refine safety models to adapt to evolving jailbreaking techniques. Incorporate adversarial training into the model development process.
  • Investigate the use of prompt prioritization mechanisms, which gives priority to external instruction to prevent from executing malicious intent in the input prompt.

Research context and confidence

Evidence and verification
Paper-reported; independent reproduction is not documented.
Primary research source linked.
Severity
Not rated by this catalog.
Source and publication type
arXiv · Research preprint.
Peer-review status is not provided by this source.
Author and publication status
Author metadata is not stored; see the primary paper.
Threat model and attacker access
Black-box model, service, or application access.
Related deployment categories
No related deployment category is classified.
Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
Affected systems
Multiple LLMs are affected, including but not limited to: GPT-3.5, GPT-4, Claude-1, Claude-2, and Llama 2. The vulnerability is not limited to specific model versions.

Research Paper

A Wolf in Sheep's Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easily

Primary source: arXiv. Findings are reported by the cited research and have not been independently verified.

View Paper

Evidence

This entry is based on a primary research source. Its findings are paper-reported; independent reproduction and verification are not claimed.

https://arxiv.org/abs/2311.08268