Shipping an AI app or agent? Security review in 1 working day: $149 / ₹13,900. Request a review →
AI Review Ready
Home / Learn / AI penetration testing
Learn · AI security testing

AI penetration testing: scope, tools and the report

An AI penetration test attacks the parts of an application that a language model touches: what it reads, what it can call, what it can reveal and what its output can break. This page sets out the scope, what is different from a web app test, the open-source tools testers use, and what a useful report contains.

Short answer: An AI pentest tests seven areas: prompt injection, tool and agent permissions, data leakage, RAG isolation, MCP servers, output handling and cost abuse. Findings are mapped to the OWASP Top 10 for LLM Applications and often to MITRE ATLAS techniques. Because the model's answers vary from run to run, a good report gives success rates, not just "vulnerable" or "not vulnerable".

What an AI penetration test covers

AreaWhat the tester triesOWASP (2026)MITRE ATLAS
Prompt injectionInstructions in the chat and in everything the app reads: documents, web pages, emails, tool results, saved memoryLLM01AML.T0051 LLM Prompt Injection; AML.T0054 LLM Jailbreak
Tool and agent permissionsGetting the agent to call a tool it shouldn't, with arguments it shouldn't, without the approval stepLLM03; Agentic ASI02, ASI03AML.T0053 AI Agent Tool Invocation
Data leakageExtracting the system prompt, other users' data, secrets in context, or sending data out through a tool callLLM02, LLM08AML.T0069.002 System Prompt; AML.T0086 Exfiltration via AI Agent Tool Invocation
RAG isolationRetrieving another tenant's documents; planting documents that get retrieved for a target questionLLM09, LLM05AML.T0070 RAG Poisoning
MCP serversUnpinned or over-privileged servers, hidden instructions in tool descriptions, injection inside server codeLLM04; Agentic ASI04-
Output handlingXSS, SQL, shell and path payloads delivered through model output; Markdown images that leak dataLLM10-
Cost abuseMaximum-size inputs, long reasoning, tool-call loops, anonymous use without quotasLLM06AML.T0034 Cost Harvesting

ATLAS IDs are from the MITRE ATLAS data release 2026.11. A dash means we did not map a single ATLAS technique to that row.

How it differs from a web application pentest

  • The same input can give a different result. OWASP's 2026 prompt injection entry puts it plainly: "LLMs make no architectural distinction between instructions and data, and their behavior is stochastic." So each attack is repeated, and a finding reads "worked 4 of 20 times", not a single screenshot.
  • The attack is plain language, and it doesn't have to come from the user. A web tester fuzzes parameters; an AI tester also writes the document, ticket or web page the model will read later.
  • Many findings are design, not bugs. "The agent can send email and also reads untrusted email" has no patch. The fix is fewer tools, narrower credentials or a human approval step.
  • Filters are not fixes. A blocklist that stops today's payload can fail against a rephrased one. OWASP recommends testing "against adaptive attackers who have read the deployed defense" and rejecting "static-only attack-success claims".
  • The ordinary web tests still matter. The chat endpoint, the upload route and the tool backends are web services. Authentication, access control between tenants and rate limits belong in the same test.

Frameworks testers map to

  • OWASP Top 10 for LLM Applications 2026 and the OWASP Top 10 for Agentic Applications 2026: the risk names most reports and questionnaires use. Our OWASP LLM Top 10 page maps the 2025 and 2026 numbering.
  • OWASP GenAI Red Teaming Guide (22 January 2025): a holistic approach in four areas, "model evaluation, implementation testing, infrastructure assessment, and runtime behavior analysis".
  • NIST AI 600-1, the Generative AI Profile of the AI Risk Management Framework (26 July 2024): describes AI red-teaming and notes that the quality of the results depends on the team's background and expertise.
  • NIST AI 100-2 E2025 (March 2025): a taxonomy and terminology of attacks on machine learning systems and their mitigations, useful for naming what you found.
  • MITRE ATLAS: a public knowledge base of adversary tactics and techniques against AI systems, with IDs like those in the table above.

Open-source tools: garak, promptfoo and PyRIT

garakpromptfooPyRIT
MaintainerNVIDIApromptfoo (its README says the company is now part of OpenAI and the project remains open source)Microsoft AI Red Team and contributors
LicenceApache-2.0MITMIT
What it is"the LLM vulnerability scanner": probes a model or endpoint for prompt injection, data leakage, jailbreaks, hallucination, toxicity and moreA CLI and library for evaluating and red-teaming LLM apps, with an OWASP LLM Top 10 preset and CI/CD integrationA toolkit with a command-line scanner, a browser GUI (CoPyRIT) and a Python framework, including adaptive multi-turn attacks
How you point it at your appGenerators for Hugging Face, OpenAI, Bedrock, LiteLLM and "pretty much anything accessible via REST"An HTTP API, a browser, or the model directlyHTTP, WebSockets, Playwright browser automation or a custom target
Start withpython -m pip install -U garak then garak --list_probesnpx promptfoo@latest redteam setup, then promptfoo redteam run and promptfoo redteam reportThe getting-started docs at microsoft.github.io/PyRIT

Two things to know before you rely on them. First, PyRIT's old repository, Azure/PyRIT, is archived with a notice that the project moved to github.com/microsoft/PyRIT; older blog posts still link the old one. Second, promptfoo's OWASP preset page lists the 2025 numbering (LLM06 Excessive Agency, LLM07 System Prompt Leakage), so translate its report IDs if your customer asks about the 2026 list.

What these tools do well is volume: hundreds of attack variants, scored automatically, repeatable in CI. Their red-team runs work by sending inputs and grading the outputs, so on their own they will not tell you that an MCP server was given your whole disk or that a GitHub token can merge. Pair them with a review of the configuration and permissions.

What the report should contain

  1. Scope and dates: which app, which environment, which user roles and tenants, what was out of scope.
  2. The exact configuration tested: model and version, system prompt version, tool and MCP server list with versions, RAG sources. AI behaviour changes when any of these change, so a result without them can't be compared later.
  3. Method and tools, with versions, and which tests were manual.
  4. Each finding: an ID, the OWASP risk (state the edition) and ATLAS technique, the input that worked, how often it worked out of how many tries, the impact in business terms, evidence (transcripts, logs, screenshots), the fix, and the retest result.
  5. A coverage table: each OWASP risk marked tested, not applicable or not tested, with the reason.
  6. Fixes in order: design changes (remove a tool, narrow a token, add approval) first, filters last.

How to prepare for an AI pentest

  • Written authorisation naming the systems, dates and what the tester may and may not do.
  • A staging environment that has the same tools, MCP servers and prompts as production, filled with fake data.
  • Two test accounts in different tenants, so cross-tenant leakage can be tested.
  • An inventory of tools: every tool and MCP server the model can call, what each can do, and the credentials it runs with.
  • The system prompt and tool descriptions, so the tester can check for secrets and for rules that are only enforced in the prompt.
  • Spending limits on the test environment, because automated tools send many requests.
  • Access to logs of model calls and tool calls, so findings come with evidence.

What you can check yourself first

Fixing the cheap findings before a paid test means the tester spends time on the hard ones. These run in your browser:

When a customer asks how you test, see how to answer the AI security testing question.

Sources

Checked 1 Dec 2026. Tool details change often; the projects' own docs win where they differ.

Related

Not ready for a full pentest yet? A Quick Review ($149 / ₹13,900, 1 working day) checks one repo, config or setup for leaked keys, risky agent permissions and MCP servers, with file-and-line evidence and a fix for each finding. Request a Quick Review. For an agent that uses MCP servers, the MCP & AI-agent security review ($600–900, 5 working days) covers your MCP config, every server it launches and the agent's tool permissions and approval settings. These are fixed-scope reviews, not a penetration test. Compare the reviews.

FAQ

What is AI penetration testing?

A time-boxed security test of an application that uses a language model, aimed at the risks the model adds: prompt injection, tool and agent permissions, data leakage, RAG isolation, MCP servers, unsafe handling of model output and cost abuse. It ends with a report of findings and fixes, usually mapped to the OWASP Top 10 for LLM Applications.

Is AI red teaming the same as an AI penetration test?

The terms overlap. NIST AI 600-1 describes AI red-teaming as exercises, often in a controlled environment, to identify potential adverse behaviour or outcomes of a generative AI model or system and stress test safeguards. A penetration test is usually narrower: one application, an agreed scope and dates, and a findings report for the team that will fix it.

Which open-source tools are used for LLM penetration testing?

Common ones are garak (NVIDIA's LLM vulnerability scanner, Apache-2.0), promptfoo (evals and red teaming CLI, MIT) and PyRIT (Microsoft's AI red teaming toolkit, MIT, now at github.com/microsoft/PyRIT). They automate attack inputs and score responses; they do not replace a review of the agent's tool permissions and configuration.

How is an AI pentest different from a normal web application pentest?

Model behaviour is not deterministic, so a finding is a success rate over repeated attempts rather than a single pass or fail. Attacks are written in plain language and can arrive through any content the model reads. Many findings are design problems, such as an agent holding a tool it does not need, and the usual web tests (authentication, access control, rate limits) still apply to the endpoints around the model.

What should an AI penetration test report include?

Scope and dates, the exact model, prompt and tool configuration tested, the tools and versions used, and for each finding the OWASP and MITRE ATLAS mapping, the input that worked, how often it worked, the impact, the evidence, the fix and a retest result, plus a list of what was not tested.