What is a Prompt Injection?
Prompt injection is an attack in which malicious instructions are embedded in content a language model processes — a document, webpage, email, or tool output — attempting to override the model's original instructions and hijack its behavior.
Direct prompt injection targets the user-facing input itself (a user typing an override instruction directly), while indirect prompt injection is the more dangerous variant for agentic systems: malicious instructions hidden in third-party content the agent reads as part of its normal work — a webpage it browses, an email it summarizes, a file it processes — that the model can't reliably distinguish from legitimate instructions, because both arrive as plain text in its context.
This becomes especially serious once a model has tool access: an injected instruction hidden in a webpage could try to get an agent to exfiltrate data, send unauthorized messages, or take a destructive action, using the agent's own legitimate permissions against it. Defenses include treating all external content as untrusted data rather than instructions, sandboxing what tools an agent can invoke without explicit confirmation, output and action allowlisting, and never letting a single unverified content source authorize a high-consequence action.
There's no fully solved defense yet — it's an active area of both attack research and model-level mitigation — so production agent systems generally combine model-level robustness with system-level guardrails (least privilege, human confirmation for destructive actions, content provenance) rather than relying on the model alone to resist injected instructions.
In practice with Neotask
Neotask's tool-policy pipeline and HIPAA-mode web/MCP egress controls exist precisely to bound what an agent can do even if a page or document it reads contains injected instructions — destructive or sensitive actions require the same approval and audit path regardless of what content the agent happened to be processing when it decided to act.
Related terms
- prompt
- penetration-testing
- tool-calling
- mcp-model-context-protocol
Plans
Free
$0/mo
Download without a card and start for free.
Individual
$50/mo
The full personal agent platform for one person.
Business
$100/mo
One company workspace with room to add your team.
Enterprise
$200/mo
Multiple workspaces and capacity for larger teams.
Continue