Guide
LLM Pentesting Checklist: Testing an AI Application Before Launch
An LLM pentest, often called an AI security assessment, tests an AI application the way an attacker would approach it: not just the language model, but above all everything built around it, meaning prompts, connected data, tools and agents, connectors, identities and logging. A practical LLM pentesting checklist covers seven areas: inputs and prompt injection, data leakage and permissions, tool and agent privileges, output handling, supply chain, abuse and cost, and logging. If you have tested those areas before launch and can map the findings to the OWASP lists for LLM and agentic applications, you know where your AI application actually stands.
- You test the application, not just the model. Most damage happens where the model is allowed to read data, call tools or pass output on to other systems.
- A classic web pentest is still needed, but it is not enough. It covers login, sessions and the API, not whether a document can steer the model.
- The OWASP Top 10 for LLM Applications 2026 (LLM01:2026 to LLM10:2026) and the OWASP Top 10 for Agentic Applications (ASI01 to ASI10) make a sound framework for organising findings.
- A good report traces each finding from input to impact, states how often it reproduced, and recommends controls in the system, not just in the prompt.
Scope
The model or the application around it.
Go to sectionChecklist
Seven test areas, item by item.
Go to sectionOWASP mapping
LLM Top 10 and Agentic Top 10.
Go to sectionWeb pentest vs. AI pentest
What is covered and what is not.
Go to sectionThe report
What each finding should contain.
Go to sectionPreparation
Test accounts, test data, written scope.
Go to sectionWhat an AI pentest covers: the model or the application?
Most companies do not train their own model. They call a provider's model through an API, give it a system prompt, connect it to their own documents and let it call tools. You usually cannot change the model itself. What you control is everything you built around it, and that is where an AI pentest focuses.
In its Top 10 for LLM Applications, the OWASP GenAI Security Project works on the assumption that a model can be fooled. The real question is therefore not whether someone can get the model to say something it should not, but what happens next: which data can it reveal, which actions can it trigger, where does its output end up? A useful scope lists every component separately:
| Component | What gets tested |
|---|---|
| Model | Which model and version, through which provider and with which settings; behaviour under bypass attempts where it matters for the application |
| Prompts | System prompt, templates and hidden context: what is in them, what must not leak, and does the application rely on instructions instead of controls? |
| RAG data | Knowledge base, vector database, document sources: who may retrieve what, and who can add content? |
| Tools and agents | Every function the model may call, with its parameters, privileges and confirmation steps; how multiple agents interact |
| Connectors | Links to mailboxes, ticketing, CRM, file storage or MCP servers, through which untrusted content comes in and actions go out |
| Identities | Whose permissions the model acts with: the signed-in user, a service account or a shared API key |
| Logging | Whether an incident can be reconstructed, and whether the logs themselves protect sensitive data |
One boundary matters: the test covers your application in your environment, under written authorisation. The model provider's infrastructure is out of scope. Check the provider's terms of use beforehand for anything that applies to testing through their API.
The checklist: seven test areas
The items below are grouped by attack surface rather than by OWASP number. The mapping to OWASP identifiers follows in the next section.
1. Inputs and prompt injection
Prompt injection remains the core risk: text that looks like an instruction redirects the model. Direct injection comes through the chat box; indirect injection comes from content the application reads on its own.
- Every input channel mapped: chat, uploaded files, fetched web pages, emails, tickets, images, audio, tool responses.
- Direct attempts to bypass the system prompt's rules tested, in several languages and encodings.
- Indirect injection tested through every source a third party can write to, such as a document in the knowledge base or an inbound email.
- Tested what a successful injection can achieve: disclosing data, calling tools, manipulating output.
For a full test plan with test cases, see our guide on how to test for prompt injection. For the MCP variant, where poisoned tool descriptions carry the injection, see prompt injection and tool poisoning in MCP.
2. Data leakage and permissions
A model has no notion of access rights. It outputs whatever is in its context. Whether user A can see user B's documents is therefore decided by the application alone, before anything reaches the context.
- Knowledge base retrieval filters by the requesting user's permissions, not by those of a service account.
- Tenant isolation tested with two accounts in different tenants, including in the vector database.
- No credentials, internal addresses or confidential rules in the system prompt, because hidden context can often be coaxed out.
- Memory and conversation history: nothing carries over between users or sessions unless intended.
- Exfiltration paths through output tested, such as links or images whose URL sends data to an outside server as soon as the interface loads them.
3. Tool and agent privileges
Once the model can act, every successful manipulation becomes an action. For agents, this is usually where the greatest damage lies. Our overview of AI agent security covers the fundamentals.
- Each tool has only the privileges its task needs. Read-only agents have no write access.
- Destructive, outbound or paid actions require human confirmation, and the confirmation dialog shows what will actually run.
- Tool call parameters are validated server-side, not in the prompt.
- The agent acts with the user's identity or narrowly scoped tokens, not a broad service account that lets a user reach more than they are allowed to.
- With multiple agents: messages between them are authenticated, and no agent blindly follows another agent's instructions.
4. Output handling
Model output is input from an untrusted source. Passed on unchecked, it recreates classic vulnerabilities through a new route.
- Output that reaches the browser is encoded or sanitised so no script runs.
- Output that flows into database queries, shell commands, file paths or templates is treated like any user input.
- Model-generated code only runs in an isolated environment with no access to secrets or the internal network.
- Markdown rendering restricted so that no external resources load unprompted.
5. Supply chain, models and plugins
- Origin and version of every model documented; provider-side model changes are noticed and retested.
- Self-hosted models and adapters only from traceable sources, in formats that do not execute code when loaded.
- Plugins, extensions and MCP servers reviewed like any third-party software: who maintains them, what privileges they request, are versions pinned? See securing MCP servers.
- Clear rules on who may add content to the knowledge base or training data, because every open write path is a route for poisoned content.
6. Abuse and cost
OWASP lists unbounded resource use as a risk of its own (Unbounded Consumption). With pay-per-use models, abuse does not just create load, it creates a bill.
- Rate limits per user, per key and per IP address, including for unauthenticated access.
- Caps on input length, output length and context size.
- Agent loops bounded: a maximum number of steps and tool calls per task.
- Budget limits and alerts configured with the model provider.
- The application cannot be used as free access to the model for unrelated purposes.
7. Logging and traceability
- Inputs, retrieved sources, tool calls and results are logged with user, timestamp and model version.
- Anomalies such as clusters of refusals, unusual tool calls or cost spikes trigger an alert.
- Logs often contain personal and confidential data. Access, retention and deletion are defined.
- After a test attack, the logs let you reconstruct what happened. The pentest should check exactly that.
Mapping to the OWASP LLM Top 10 and Agentic Top 10
Two lists from the OWASP GenAI Security Project form the usual framework: the OWASP Top 10 for LLM Applications, 2026 edition, and the OWASP Top 10 for Agentic Applications for 2026. The first looks at the model as a component of the application, the second at the agent that plans, acts and remembers. The table shows which entries each of the seven test areas mainly covers. Each entry is explained in the linked guides.
| Test area | OWASP LLM Top 10 (2026) | OWASP Agentic Top 10 |
|---|---|---|
| Inputs and prompt injection | LLM01:2026 Prompt Injection | ASI01 Agent Goal Hijack |
| Data leakage and permissions | LLM02:2026 Sensitive Information Disclosure, LLM08:2026 Hidden Context Exposure, LLM09:2026 Vector and Embedding Weaknesses | ASI06 Memory & Context Poisoning |
| Tool and agent privileges | LLM03:2026 Excessive Agency | ASI02 Tool Misuse and Exploitation, ASI03 Identity and Privilege Abuse, ASI07 Insecure Inter-Agent Communication, ASI09 Human-Agent Trust Exploitation |
| Output handling | LLM10:2026 Improper Output Handling | ASI05 Unexpected Code Execution |
| Supply chain, models, plugins | LLM04:2026 Supply Chain, LLM05:2026 Data and Model Poisoning | ASI04 Agentic Supply Chain Vulnerabilities |
| Abuse and cost | LLM06:2026 Unbounded Consumption | ASI08 Cascading Failures, where failures propagate through agent chains |
| Logging | Cross-cutting, no entry of its own | A precondition for detecting ASI10 Rogue Agents at all |
One entry is deliberately left out of the checklist: LLM07:2026 Misinformation. Whether a model gives factually wrong answers is more a quality assurance question than an attack. It becomes relevant to a pentest where users or downstream systems rely on output without checking it.
If you also need a risk management framework: in July 2024 the US National Institute of Standards and Technology (NIST) published the Generative AI Profile (NIST AI 600-1), a companion resource to the AI Risk Management Framework (AI RMF 1.0). It lists information security as a distinct risk of generative AI and names prompt injection and data poisoning explicitly. Among its suggested actions are red-teaming and independent external evaluations. The profile is voluntary and does not replace testing, but it helps place the results within a risk management process.
What a classic web pentest covers, and what it misses
An AI application is first of all a web application with an API. Login, session management, object-level authorisation and interfaces need testing just like any other application, for example along our API pentest checklist. What a classic test does not capture is how the model behaves as part of the application.
| Test subject | Classic web/API pentest | AI pentest |
|---|---|---|
| Authentication, sessions, API object permissions | Yes, core scope | Assumed or tested alongside |
| Injection into SQL, shell, HTML | Yes, through direct input | Also through model output as an intermediate step |
| Steering the model through text in inputs and documents | No | Yes |
| Privileges and confirmations for tool calls | Only where visible as an API endpoint | Yes, from the model's perspective as caller |
| Permission filtering in RAG and the vector database | Rarely | Yes |
| Extracting the system prompt and hidden context | No | Yes |
| Cost and loop abuse | Partly, as rate limiting | Yes, including token and agent limits |
There is a methodological difference too: models do not always answer the same way. An attack that fails on the first attempt may succeed on the fifth. An AI pentest therefore repeats attacks and documents how reliably a finding occurs. For how a pentest runs in general, see penetration testing: process, duration and cost.
What the report should contain
An AI pentest report has to be readable for management and actionable for engineering. Look for these elements:
- Tested state. Model and version, system prompt revision, connected data sources and tools, test window and environment. If any of these change, the finding needs reassessing.
- The full attack path per finding. Where the input came from, what the model made of it, which tool or output was affected, and what happened in the end.
- Reproduction. The exact inputs used and how often the attack succeeded across repeated attempts.
- Impact and severity. Tied to your data and workflows, not in the abstract.
- Mapping. The matching OWASP identifiers, so findings stay comparable and trackable.
- System-level recommendations. Restrict privileges, add confirmation, encode output, filter before the context. "Improve the prompt" on its own is rarely a robust fix.
- What was not tested. What was explicitly out of scope or not covered for lack of time.
- Retest. Confirmation that the fixes work.
To see what such a report looks like in practice, take a look at our sample report on a tested MCP integration.
How to prepare your team
The better the preparation, the more testing time goes into real attack paths instead of access issues.
- Written scope. Which application, which environment, which components from the table above, and which tools may actually be executed. Write and outbound actions are best tested in a staging environment.
- Test accounts. At least two accounts per role and, for multi-tenant applications, accounts in two different tenants. That is the only way to check whether data crosses boundaries.
- Test data. Synthetic data instead of real customer data, plus a few documents carrying unique marker strings. If a marker later shows up in the wrong place, the leak is proven.
- Insight into the design. System prompt, list of tools with their privileges, an architecture sketch. A test with this knowledge finds more in the same time than a pure black-box test.
- Limits and contacts. A cost budget for model calls during the test, stop criteria and a reachable contact person.
- Logging switched on. So that afterwards you can check whether your monitoring would have seen the attacks.
Want your AI application tested before launch?
We test AI applications, agents and MCP integrations within a scope agreed in writing: inputs and prompt injection, data leakage through RAG and context, tool and agent privileges, output handling and cost abuse, plus the web application and API around them. Every finding comes with reproducible evidence, a mapping to the OWASP identifiers and a concrete fix. Learn more about our AI pentest and MCP security service.
Request an AI pentestCyberSec42 is an independent technical security assessment, not an accredited certification body, and does not provide legal advice. CyberSec42 is not affiliated with the OWASP Foundation or NIST.
Frequently asked questions
What is the difference between an LLM pentest and an AI security assessment?
The terms are often used interchangeably. A pentest emphasises active attack with proof for each finding. An assessment may also evaluate architecture, configuration and processes. What matters is not the label but that the scope covers the application around the model.
Does the language model itself need to be tested?
With a third-party model, usually not in isolation. The test looks at how the model behaves inside your application, with your system prompt, your data and your tools. The model provider's infrastructure is out of scope.
Is a standard web pentest enough for an AI application?
No, although it is still needed. It covers login, sessions and the API. Whether a document can steer the model, whether the knowledge base respects permissions and what tools do when things go wrong only shows up in a test that attacks the model as part of the application.
Which OWASP list applies to my application?
For any application with a language model, the OWASP Top 10 for LLM Applications 2026. Once the model calls tools on its own, plans or has memory, add the OWASP Top 10 for Agentic Applications. For MCP integrations, the OWASP MCP Top 10 comes on top.
When should the AI pentest take place?
Before launch, once features, tools and data sources are settled. Then again after significant changes, such as a new tool, a new data source or a model switch.
Can findings in AI applications be reproduced at all?
Yes, though not always on the first attempt. A good report therefore gives the exact inputs used and how often the attack succeeded across repeated runs. An attack that only works some of the time is still a finding.
Further reading
- AI red teaming explained
- The OWASP Top 10 for LLM Applications 2026, Explained in Practice
- The OWASP Top 10 for Agentic Applications, Explained in Practice
- Prompt Injection Testing: Test Plan, Test Cases and Scoring
- Service: AI pentest and MCP security
Sources
- OWASP GenAI Security Project: Top 10 for LLM Applications 2026
- OWASP GenAI Security Project: 2026 Top 10 for LLM Applications announcement
- OWASP GenAI Security Project: Top 10 for Agentic Applications for 2026
- OWASP MCP Top 10
- NIST AI 600-1: Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile
- NIST AI 100-1: Artificial Intelligence Risk Management Framework (AI RMF 1.0)