Skip to content
REDMAW

AI Systems

Indirect Prompt Injection

Adversarial instructions delivered through content an AI system retrieves, causing unintended model or agent behavior.

RedMaw ResearchUpdated August 20, 20267 min read

Definition

Indirect prompt injection occurs when adversarial instructions are placed in content that an AI system later retrieves, such as a document, ticket, web page, email or repository file, and the system treats that content as instruction rather than as data.

How the attack works

  1. 01The attacker plants instructions in a source the target system can reach
  2. 02A user or automated workflow causes that content to be retrieved
  3. 03The content enters the model's context alongside trusted instructions
  4. 04The model or agent acts on the injected instruction
  5. 05If the agent holds tools, the action executes against real systems

How adversarial validation works

RedMaw places benign marked payloads in authorized content sources and observes whether the system's behavior changes, specifically whether disclosure or a tool call occurs that should not. Evidence records the source, the retrieved context and the resulting action.

Tags

  • ai
  • prompt injection
  • agents
  • rag

Validation

How RedMaw validates this attack

Validation runs only inside authorized scope, with agreed exploitation limits.

  1. 01Enumerate content sources that reach the context window
  2. 02Insert marked, benign payloads within authorized scope
  3. 03Observe behavior change, disclosure or tool invocation
  4. 04Capture evidence and re-test after prompt, model or tool changes

Keep going

Related

Further reading

Attack LibraryAI Systems

RAG / Context Poisoning

If you can influence what gets retrieved, you can influence what the system does with it.

· 6 min read

Stop assuming you are secure. Prove it.

Continuously test what an attacker can actually reach across your applications, SaaS identities, internal infrastructure and AI systems.