APromptRiskDBThreat intelligence atlas
AI Security Technique

LLM Prompt Self-Replication - AI Security Technique

An adversary may use a carefully crafted LLM Prompt Injection designed to cause the LLM to replicate the prompt as part of its output. This allows the prompt to propagate to other LLMs and persist on the system. The self-replicating prompt is typically paired with other malicious instructions (ex: LLM Jailbreak, LLM Data Leakage).

AI Security TechniquedemonstratedPersistence

Record summary

A quick snapshot of what this page covers.

Tactics1Attacker goals connected to this method.
Mitigations3Defenses that may help against this attack.
AI risks24Research-backed risks connected to this topic.

Attack context

How this AI attack works in practice.

ATLAS ID
AML.T0061
Priority score
159
Maturity: demonstrated
Persistence

Mitigations

Defenses that may help against this attack.

AML.M0020 - Generative AI Guardrails

ML Model EngineeringML Model Evaluation+1 more
LifecycleML Model Engineering + 2 moreCategoryTechnical - ML

Guardrails can help prevent replication attacks in model inputs and outputs.

AML.M0021 - Generative AI Guidelines

ML Model EngineeringML Model Evaluation+1 more
LifecycleML Model Engineering + 2 moreCategoryTechnical - ML

Guidelines can help instruct the model to produce more secure output, preventing the model from generating self-replicating outputs.

AML.M0022 - Generative AI Model Alignment

ML Model EngineeringML Model Evaluation+1 more
LifecycleML Model Engineering + 2 moreCategoryTechnical - ML

Model alignment can increase the security of models to self replicating prompt attacks.

Case studies

Examples from public reports and exercises.

Morris II Worm: RAG-Based Attack

exercise
Date2024-03-05

Researchers developed Morris II, a zero-click worm designed to attack generative AI (GenAI) ecosystems and propagate between connected GenAI systems. The worm uses an adversarial self-replicating prompt which uses prompt injection to replicate the prompt as output and perform malicious activity. The researchers demonstrate how this worm can propagate through an email system with a RAG-based assistant. They use a target system that automatically ingests received emails, retrieves past correspondences, and generates a reply for the user. To carry out the attack, they send a malicious email containing the adversarial self-replicating prompt, which ends up in the RAG database. The malicious instructions in the prompt tell the assistant to include sensitive user data in the response. Future requests to the email assistant may retrieve the malicious email. This leads to propagation of the worm due to the self-replicating portion of the prompt, as well as leaking private information due to the malicious instructions.

Source

Where this page information comes from.