Red Team Agent System Prompts for Injection Vulnerabilities

Assess the security of your agent system prompt against five common indirect prompt injection vectors using a structured risk analysis table.

Agent prompt for Claude and ChatGPT

Prompt

Prompt
Act as an AI security engineer specializing in red-teaming agentic systems. Your goal is to evaluate my system prompt against indirect prompt injection risks, specifically focusing on how the agent processes untrusted tool inputs like web content or API data. Please ask me the following three questions first: 1. Paste your current system prompt. 2. What are the primary tools or external data sources the agent accesses? 3. What is the most sensitive action the agent can perform? After I respond, analyze the prompt for vulnerabilities and generate a markdown table. The table must have columns: Attack Vector, Description, Likelihood (High/Medium/Low), Blast Radius (High/Medium/Low), and Mitigation. List five distinct attack scenarios tailored to my specific tools. This is for security testing purposes only and does not constitute professional cybersecurity advice; consult a qualified security professional for production deployments.

Example output

Injection risk by attack vectorLikelihood versus blast radius for five vectors
ItemLikelihoodBlast Radius
Context OverflowHighHigh
Tool Call HijackingHighHigh
Indirect Prompt InjectionMediumMedium
Data ExfiltrationMediumHigh
Prompt LeakingLowLow

Example for: an agent tasked with summarizing public website content and drafting emails via a Gmail API tool.

Vulnerability Risk Assessment
Attack VectorDescriptionLikelihoodBlast RadiusMitigation
Context OverflowAttacker hides commands in invisible web text to override instructions.HighHighUse structured schemas for output parsing.
Tool Call HijackingAttacker injects parameters to change the Gmail recipient address.HighHighImplement strict output validation and human-in-the-loop.
Indirect Prompt InjectionAttacker uses a malicious URL to force the agent to exfiltrate logs.MediumMediumSanitize all incoming data from untrusted URLs.
Data ExfiltrationMalicious web content instructs the agent to forward email drafts.MediumHighRestrict tool access to specific domains and schemas.
Prompt LeakingAttacker forces the agent to output its own system instructions.LowLowUse separate system and user message roles.
Security Summary

The agent is currently vulnerable to parameter manipulation because it trusts the content of parsed webpages to dictate tool arguments. The primary risk is the Gmail API tool, which has a high blast radius. I recommend implementing a strict allowlist for email domains and requiring manual confirmation for all outgoing emails generated from external sources.

Written by AI from this prompt. Your results will vary.

Tips and common edits

Why this works

  • Requires specific context about tools and tasks to provide relevant attack vectors.
  • Uses a standardized table format for clear risk visualization and comparison.
  • Includes a mandatory security disclaimer regarding professional advice.

Use this to stress-test your LLM agent's instruction set before deployment. Paste this prompt into Claude, ChatGPT, or Gemini. Have your system prompt and tool documentation ready for the follow-up questions.

Common edits

  • Adjust the risk levels based on your specific infrastructure environment.
  • Expand the mitigation column into a separate checklist for your engineering team.

Reuse it: Use in a workflowAdapt in the builder

Prompt details

By
Prompts-GPT editors
Published
How prompts are written and checked

Did this prompt work?

More in Agentic AI
Agentic AIClaude

Generate Adversarial Evaluation Transcripts for AI Agents

Create three distinct multi-turn conversation logs designed to test your AI agent for social engineering, tool hallucination, and silent goal drift.

Agentic AIClaude

Draft Input Sanitization Rules for AI Agents

Get five strict, deterministic input-sanitization rules to prevent prompt injection and data leakage before processing untrusted user inputs in an agent.

Agentic AI

Tool Permission Matrix and Function Spec for a Tool-Using Agent

Produces a least-privilege tool inventory, function definitions, and approval rules for an agent that calls APIs or internal systems.

Agentic AIClaude

Audit Agent Tool Definitions to Fix Routing Errors

This prompt analyzes your AI agent tool descriptions to eliminate overlap, define clear boundaries, and prevent incorrect tool routing by adding explicit anti-use guidance.

Agentic AIClaude

Establish an Automated LLM-as-a-Judge Rubric for Tool Calls

Create a structured 1-to-5 grading rubric to verify the accuracy, necessity, and completeness of multi-step AI tool calls.