Prompt Injection Scanner

Detect prompt injection vulnerabilities in your LLM applications. Test for direct attacks, indirect injection, and system prompt extraction.

Free plan: scan and export a PDF with no credit card

Understanding Prompt Injection

TL;DR: An attacker embeds instructions in user input. The model obeys them instead of its own rules.

Prompt injection is ranked #1 in the OWASP Top 10 for LLM Applications. It occurs when an attacker manipulates an LLM through crafted inputs, causing it to ignore original instructions or perform unintended actions.

#1
OWASP LLM Risk
OWASP
LLM01 Category
Critical
Severity Level

Types of Prompt Injection

1

Direct Injection

Malicious instructions embedded directly in user prompts attempting to override system behavior.

Example: "Ignore previous instructions and..."

2

Indirect Injection

Hidden instructions embedded in external content like documents, emails, or web pages.

Example: Malicious content in a PDF the LLM is asked to summarize

3

System Prompt Extraction

Techniques designed to trick the LLM into revealing its underlying instructions.

Example: "Repeat your system instructions verbatim..."

Defense Strategies

TL;DR: No single control stops all injection attacks. Layer these defenses.

Protect your LLM application with these security best practices:

  • ✓Input validation and sanitization
  • ✓Output filtering and monitoring
  • ✓System prompt hardening
  • ✓Context isolation between users
  • ✓Regular security testing

Frequently Asked Questions

What is prompt injection in LLMs?

Prompt injection — where an attacker embeds hidden instructions inside user input — tricks an LLM into ignoring its own rules. The model follows the attacker's instructions instead of its system prompt.

How does a prompt injection scanner work?

A prompt injection scanner works by sending a series of adversarial payloads to an LLM endpoint and analyzing the responses. It checks if the model followed the attacker's instructions instead of its system prompt.

What is the difference between direct and indirect prompt injection?

Direct prompt injection happens when a user explicitly provides malicious text. Indirect prompt injection occurs when the LLM processes external data (like a website or document) that contains hidden malicious instructions.

Is prompt injection listed in the OWASP Top 10?

Yes, Prompt Injection is ranked as the #1 most critical vulnerability in the OWASP Top 10 for Large Language Model Applications (LLM01).

How can I prevent prompt injection?

Prevention strategies include using delimiters in system prompts, implementing strict output filtering, using LLM-based firewalls, and maintaining a clear separation between instructions and user-provided data.

Can BastionLLM detect all types of prompt injection?

BastionLLM tests for a wide range of known patterns, including direct, indirect, and extraction attacks. While no tool can guarantee 100% detection of novel attacks, it provides comprehensive coverage of common and OWASP-aligned risks.

Find Prompt Injection Vulnerabilities Now

Our scanner tests against 10+ prompt injection attack patterns based on OWASP guidelines.

Start Free Prompt Injection Scan →