AI Application Testing

AI Application Penetration Testing

Most reporting on AI security focuses on the model. Most incidents in AI applications come from what the model is allowed to do: tools with too much authority, retrieval that crosses tenant boundaries, and output trusted because it came from your own system.

In short

AI application penetration testing assesses an LLM-backed application end to end: prompt injection including indirect injection through retrieved content, tool and function-call abuse, agent authorisation, data leakage through retrieval and embeddings, and the conventional application flaws around it.

What is genuinely new
Untrusted text becoming instructions, and tools executing on the model's behalf
What is not new
Authorisation, tenancy, injection, secrets handling — the majority of findings
Highest-severity pattern
Indirect prompt injection reaching a tool that has real permissions
Time to first findings
Minutes
Entry price
From $100/month
Model access needed
No: testing works against your application, not your model weights

What gets tested

Test scope, by attack surface

Prompt injection, direct and indirect

  • Direct injection: user input overriding system instructions or extracting them
  • Indirect injection: instructions hidden in retrieved documents, web pages, emails or file uploads the model reads
  • Injection through data the application trusts because it produced it: summaries, tickets, previous turns
  • Instruction persistence across a session, and whether a poisoned turn contaminates later ones
  • Multi-language and encoding tricks that bypass naive input filtering

Tools, functions and MCP servers

  • Whether a tool can be invoked with arguments the user should not be able to supply
  • Tool authorisation: does the tool re-check the caller's permissions, or trust the model's intent
  • Chained tool calls reaching further than any single call was meant to
  • MCP server exposure: authentication, scoping and whether one tenant's server can be reached by another
  • Server-side request forgery through tools that fetch URLs on the model's behalf

Retrieval and data boundaries

  • Cross-tenant retrieval: whether a query can surface another customer's documents
  • Filter enforcement at the vector store rather than in the prompt
  • Embedding and index poisoning through user-supplied content
  • Sensitive data in retrieved context that the user is authorised to ask about but not to see
  • Conversation history and cache leakage between users or sessions

Output handling

  • Model output rendered as HTML or Markdown, producing XSS from generated content
  • Generated SQL, shell commands or code executed without validation
  • Output used in authorisation decisions ("the model said the user is an admin")
  • Downstream systems trusting AI-generated content as pre-validated

The ordinary application underneath

  • Authorisation on every endpoint the AI feature exposes, per role and per tenant
  • API keys for model providers in frontend bundles, logs or error output
  • Rate limiting and cost abuse: expensive generation triggered by unauthenticated callers
  • Prompt and response logging that stores customer data somewhere it should not be

Not in scope

Model weight extraction, training data reconstruction and academic model attacksAttacks against your model provider's infrastructure (OpenAI, Anthropic, Google and similar)Fine-tuning pipeline security where it lives outside the application boundaryVolumetric denial of service, including deliberate token exhaustion at scaleBias, fairness and content-safety evaluation, which are real concerns and a different discipline

Methodology

How the test runs, step by step

01

Map the AI surface

Identify every place model output enters the system and every capability the model can invoke: endpoints, tools, function definitions, MCP servers, retrieval sources, and what each tool is authorised to do. The tool inventory is usually where the first surprise lives.

AI surface and capability inventory
02

Test the trust boundaries

Attempt direct and indirect injection against each entry point, including content the application retrieves rather than content the user types. The interesting question is never whether the model can be persuaded — it is what happens next.

Injection findings by entry point
03

Exercise the tools

For every tool, test whether it re-checks the caller's authorisation, whether arguments can be manipulated, and whether chaining reaches data or actions no single call should. This is where a prompt-injection curiosity becomes a breach.

Tool authorisation findings
04

Probe data boundaries

Attempt cross-tenant retrieval, filter bypass at the vector store, and extraction of context the user may ask about but not see. Test as multiple tenants, because a single-tenant test cannot find the class that matters most.

Retrieval and tenancy findings
05

Chain and report

Combine what works into the path an attacker would take — poisoned document, injected instruction, tool call, data — with reproduction steps and the specific control that breaks the chain. Retest after each fix, included.

Attack chains, report, retest on demand

Straight answers

What buyers actually ask

Is AI security actually different, or is this a rebrand?

Two things are genuinely new. Untrusted text can become instructions, which breaks the old assumption that data and code are separable — and it arrives through content your application fetches, not only through the input box. And the model can act, through tools, with whatever authority you granted them.

Everything else is ordinary application security wearing new vocabulary, and it is where most findings land: authorisation per tenant, secrets handling, output encoding, rate limiting. A team that treats AI security as a novel discipline and skips the boring half ships the same IDOR everyone else does, just with an LLM in front of it.

Can prompt injection be fixed?

Not reliably at the prompt layer, and anyone promising otherwise is selling. Instruction and data share a channel, so filtering raises the cost of an attack without closing the class.

What does work is assuming injection succeeds and constraining the consequences: tools that re-check the caller's authorisation rather than trusting the model, retrieval filtered at the store rather than by instruction, output treated as untrusted input, and human confirmation on actions that move money or data. Then a successful injection produces an odd answer instead of an incident — which is the achievable goal.

What about MCP servers and agents?

They concentrate the risk, because an agent with tools is a system that acts on instructions it received from somewhere. The questions worth asking are unglamorous: which credentials does the server hold, whose authority does a tool call carry, can one tenant reach another tenant's server, and is there an audit trail of what the agent actually did.

The recurring finding is a tool that trusts the model's intent instead of re-checking the user's permissions. That is not an AI flaw; it is a missing authorisation check in a new place, and it is testable the same way any authorisation flaw is.

Do you need access to our model or training data?

No. We test your application: the endpoints, the tools, the retrieval layer and the surrounding authorisation. That is where the exploitable findings are, and it needs nothing but a URL and credentials for each role.

Model-level work — weight extraction, training data reconstruction, alignment evaluation — is a different discipline and out of scope. If your model provider is OpenAI, Anthropic or Google, their infrastructure is their responsibility and we do not test it.

Comparison

Four ways to get a web app tested

Model evaluation / red-teamingGuardrail productTraditional pentestPenetrify
Prompt injection resistanceYesFilters attemptsRarely testedYes, including indirect
Tool and function-call abuseNoNoSometimesYes
Cross-tenant retrieval leakageNoNoRarelyYes
Authorisation in the surrounding appNoNoYesYes
Output-handling flaws (XSS from generation)NoPartialSometimesYes
Runs on every deployNoContinuous filteringNoYes
Typical costSpecialist engagementPlatform subscription$15,000-$50,000From $100/month

Common findings

What these tests keep finding

CRITICALIndirect prompt injection through a retrieved document triggers a tool call that reads another tenant's data
CRITICALTool executes with service-level credentials instead of the calling user's permissions
CRITICALVector store query filtered by prompt instruction rather than by tenant at the store, so retrieval crosses customers
HIGHModel provider API key exposed in the frontend bundle or a response header
HIGHModel output rendered as HTML, turning generated content into stored XSS
HIGHTool fetches arbitrary URLs, giving SSRF against internal services and cloud metadata
MEDIUMSystem prompt extractable, revealing internal logic, tool names and business rules
MEDIUMExpensive generation reachable without authentication or rate limiting, enabling cost abuse
MEDIUMPrompts and responses logged with customer data into systems outside the data boundary

Real teardowns of findings like these, with the request that proved them: read the case studies.

Deliverables

What you get

Findings report

Each finding with severity, the exact prompt or request that triggers it, what it reached, and the control that breaks the chain.

Tool authority map

What every tool can do and whose authority it acts with — usually the first document that makes the risk legible to the people who built it.

Attack chains

Poisoned content to injected instruction to tool call to data, documented end to end rather than as three unrelated medium findings.

Retest history

What closed, what regressed and when, which matters more in AI features because prompts and tools change weekly.

Compliance

Frameworks that expect penetration testing

EU AI Act

Obligations phase in from 2025-2027 by risk class; security testing evidence supports the risk-management and robustness expectations for higher-risk systems

SOC 2 Type II

CC6.1: logical access controls, which now include what your tools and agents can reach

GDPR

Article 32: regular testing of technical measures, including anything that sends personal data to a model provider

ISO 27001

A.12.6: technical vulnerability management, extended to the AI surface

OWASP Top 10 for LLM Applications

Not a regulation, but the reference taxonomy most reviewers expect you to have mapped against

FAQ

AI Application Penetration Testing questions

What is AI penetration testing?

Testing an LLM-backed application the way an attacker would: prompt injection including indirect injection through retrieved content, tool and function-call abuse, agent authorisation, cross-tenant retrieval leakage, output handling, and the conventional application flaws around the AI feature.

Is prompt injection the main risk?

It is the entry point, not the impact. A successful injection matters only in proportion to what the model can do next, which is why tool authority and retrieval filtering are the controls that decide severity. Injection into a system with no tools and no cross-tenant data is a curiosity.

Do you test MCP servers?

Yes: authentication and scoping, whether a tool re-checks the caller's permissions rather than trusting the model, whether chained calls exceed any single call's authority, and whether one tenant can reach another tenant's server.

Does this replace model red-teaming?

No, and they answer different questions. Model red-teaming asks whether the model produces harmful or policy-violating output. This asks whether your application can be made to do something it should not. A safe model in an application with over-privileged tools is still a breach waiting to happen.

How much does AI application penetration testing cost?

Specialist consultancy engagements price like any expert engagement, commonly five figures. Penetrify tests AI applications as part of the platform from $100 a month with retests included, which suits features whose prompts and tools change weekly.

Get started

Test your web application today

No scoping call, no statement of work, no testing window to wait for. Add a URL and credentials, and the first findings land in minutes.