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

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

Stochastic Monkey Jailbreak

Large Language Models (LLMs) employing safety alignment mechanisms are vulnerable to a bypass attack using simple, stochastic random augmentations of input prompts. The attack leverages the inherent brittleness of…

BibTeX citation

Paper-evaluated models(15)

GPT-4o, Llama 2 13B Chat, Llama 2 7B Chat +12 more
  • GPT-4o
  • Llama 2 13B Chat
  • Llama 2 7B Chat
  • Llama 3 8B Instruct
  • Llama 3.1 8B Instruct
  • Mistral 7B Instruct v0.2
  • Phi 3 Medium 4k Instruct
  • Phi 3 Mini 4k Instruct
  • Phi 3 Small 8k Instruct
  • Qwen 2 0.5B
  • Qwen 2 1.5B
  • Qwen 2 7B
  • Vicuna 13B v1.5
  • Vicuna 7B v1.5
  • Zephyr 7B Beta

Description

Large Language Models (LLMs) employing safety alignment mechanisms are vulnerable to a bypass attack using simple, stochastic random augmentations of input prompts. The attack leverages the inherent brittleness of safety alignment to minor, randomly introduced modifications in the input, causing the LLM to generate unsafe outputs despite its safety training. Character-level augmentations prove significantly more effective than string insertions.

Examples

See https://github.com/uiuc-focal-lab/stochastic-monkeys/ (opens in a new tab). The repository contains examples demonstrating successful bypasses across multiple LLMs using character-level deletions and insertions with various parameters. Specific examples are provided in Appendix D.5 of the linked paper.

Impact

Successful exploitation allows malicious actors to bypass LLM safety filters and elicit unsafe outputs (hate speech, instructions for illegal activities, etc.), even with minimal computational resources and technical expertise. This significantly reduces the effectiveness of current safety alignment techniques.

Affected Systems

Multiple LLMs, including but not limited to Llama 2, Llama 3, Llama 3.1, Mistral, Phi 3, Qwen 2, Vicuna, and Zephyr (various sizes and quantization levels). The vulnerability is observed across different safety alignment techniques and decoding strategies. Closed-source models may also be vulnerable if they allow greedy decoding or modification of system prompts.

Mitigation Steps

  • Restrict or carefully control the use of greedy decoding in LLMs.
  • Implement robust input sanitization and pre-processing, including typo correction and paraphrase detection.
  • Explore and implement defensive techniques like semantic smoothing or adversarial training that generalizes to a wider range of perturbations including random augmentations. Consider regularization techniques to prevent over-eager responses to unintelligible suffixes. (Note that the effectiveness needs to be evaluated).
  • Carefully design and implement safety-encouraging system prompts. Further research is needed to determine optimal prompting strategies for different models.
  • Regularly audit and update safety models to adapt to new attack techniques.

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, including but not limited to Llama 2, Llama 3, Llama 3.1, Mistral, Phi 3, Qwen 2, Vicuna, and Zephyr (various sizes and quantization levels). The vulnerability is observed across different safety…

Research Paper

Stochastic Monkeys at Play: Random Augmentations Cheaply Break LLM Safety Alignment

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/2411.02785