Skip to main content
LLM Security Database
Skip to research details
Back to research findings
LMVD-ID: 99fb61e6
Paper published January 1, 2025
Entry analyzed February 2, 2025
Paper-reported evidence
Confidence: Source-linked

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

Universal Magic Word Jailbreak

A vulnerability exists in text embedding models used as safeguards for Large Language Models (LLMs). Due to a biased distribution of text embeddings, universal "magic words" (adversarial suffixes) can be appended to…

BibTeX citation

Paper-evaluated models(5)

E5 Base v2, Jina Embeddings v2, Nomic Embed +2 more
  • E5 Base v2
  • Jina Embeddings v2
  • Nomic Embed
  • Qwen 2.5 0.5B
  • Sentence-T5 Base

Description

A vulnerability exists in text embedding models used as safeguards for Large Language Models (LLMs). Due to a biased distribution of text embeddings, universal "magic words" (adversarial suffixes) can be appended to input or output text, manipulating the similarity scores calculated by the embedding model and thus bypassing the safeguard. This allows attackers to inject malicious prompts or responses undetected.

Examples

  • Positive Magic Word: Appending the word "amazing" to a malicious prompt might cause the embedding model to classify it as benign due to the increased similarity with benign prompts after adding the suffix "amazing".
  • Negative Magic Word: Appending the word "nothing" to a malicious response produced by the LLM might decrease its similarity with other (malicious) responses significantly and, therefore, lead to the embedding model classifying the text as safe. Specific examples of effective magic words vary depending on the text embedding model used and are detailed in the research paper (arXiv:2501.18280 (opens in a new tab)).

Impact

High. Attackers can bypass LLM safeguards, leading to the generation and dissemination of harmful content, including but not limited to:

  • Evasion of content moderation systems.
  • Generation of malicious code or instructions.
  • Spread of misinformation or propaganda.
  • Manipulation of search engine results.

Affected Systems

Any system utilizing text embedding models (e.g., Sentence-BERT, Sentence-T5) as safeguards for LLMs. This vulnerability impacts both input and output safeguards.

Mitigation Steps

  • Renormalization: Subtract the mean embedding from text embeddings before calculating similarity scores, followed by normalization. This corrects the biased distribution of embeddings.
  • Vocabulary Cleaning: Remove rare, out-of-distribution words (especially markup and foreign words) from the vocabulary of text embedding models.
  • Reinitialization and Fine-tuning: Reinitialize low-frequency words in the text embedding model, followed by fine-tuning, to reduce the impact of adversarial words.

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
Both white-box and black-box research contexts are tagged; consult the primary paper for target-specific access.
Related deployment categories
No related deployment category is classified.
Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
Affected systems
Any system utilizing text embedding models (e.g., Sentence-BERT, Sentence-T5) as safeguards for LLMs. This vulnerability impacts both input and output safeguards.

Research Paper

Jailbreaking LLMs' Safeguard with Universal Magic Words for Text Embedding Models

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