Skip to content

Meet DeepintShield at Bengaluru Tech Summit 2026, 17 to 19 November, BIEC Hall 1, booth H1A106. Book 20 minutes

Start For Free

Stop prompt injection attacks

Layer injection checks across prompts, retrieved content, MCP traffic and answers, and require an explicit Allow before any agent action.

No single filter answers how to stop prompt injection attacks, so layer the controls. DeepintShield checks prompts, retrieved chunks, MCP traffic, agent actions and responses at five enforcement stages, using 460+ detection patterns and ML detectors, and requires an explicit Allow before any governed agent action runs.

The challenge

Prompt injection works because models cannot reliably tell instructions from data. Attacks arrive from more places than the chat box:

  • Direct injection and jailbreaks. Users try to override the system prompt or talk the model out of its rules.
  • Indirect injection. Documents, web pages, emails and tool results carry instructions aimed at the assistant.
  • Injection that acts. In an agent, a successful injection can become a tool call, not just a bad answer.
  • Detection is never complete. New phrasings appear constantly, so a filter alone will miss some.

The approach

Use defence in depth. Detect known patterns at every entry point, including retrieved content and tool results. Add model-based classifiers for phrasing that patterns miss. Limit what a successful injection could do by authorising each action separately. Check the output too. Keep system prompts free of secrets, because a determined attacker may get the model to repeat them. Roll out in shadow mode, review false positives, then enforce. Set per-category timeouts so slower ML checks do not hold up fast pattern checks, and decide for each check whether a timeout fails open (the default) or closed. The OWASP LLM Top 10 checklist shows where this fits with the other risks.

How to stop prompt injection attacks with DeepintShield

  1. Turn on injection detection at Input. The guardrail pattern catalogue has 462 entries in 102 preset families, covering prompt injection, retrieval and memory, credentials, tools and execution, and agentic controls such as goal hijacking. Matching runs locally with no network or model calls. On Team and above, add the ML detector sidecar with prompt-injection and jailbreak classifiers, and link AWS Bedrock Guardrails, Azure AI Content Safety or Google Model Armor as safety providers that run in parallel. See the pattern catalogue docs.
  2. Extend the checks to RAG and MCP. Score retrieved chunks for injection with guard_retriever() and quarantine suspect sources. Apply guardrails at the MCP stage to tool arguments and results; safety providers can also evaluate live MCP tool calls.
  3. Limit the blast radius. Filter MCP tools per Virtual Key and, on Business and above, require an exact Allow from Agentic Security for every governed tool call. Check answers at the Output stage. Speculative dispatch, on for eligible non-streaming requests, keeps allow-path latency at max(guards, model) instead of guards + model. See speculative dispatch.

Pattern counts are configuration entries, not a measure of accuracy, and an unmatched request is not proof of safety. That is why the action check matters.

What you can show afterwards

  • Findings by stage and preset family, with status passed, redacted, blocked or flagged.
  • Jailbreak and prompt-injection attempts recorded as security events in the audit log.
  • The policies evaluated for each request, returned in guardrail responses as policies_evaluated.
  • Tool calls that were denied even when an injection got through.
  • False positives found in shadow mode on your own traffic, and how the policy was tuned.

Build a small attack set from your own application: direct jailbreak prompts, an instruction hidden in a retrieved page, an instruction in a tool result, and a request that tries to make the agent call a tool it should not. Run it in shadow mode, review false positives with the application owner, then enforce. Re-run the set whenever policies, models or tools change. Read what each of the five guardrail stages checks.

Start For Free