Eight months after ChatGPT's launch, many organisations have LLM features in production or on the way: customer support assistants, internal knowledge bots, document summarisers and code assistants. Security teams are being asked to test and approve them, often with little guidance.
That guidance is starting to arrive. On 1 August, OWASP released version 1.0 of its Top 10 for Large Language Model Applications. This article takes the attacker's perspective on those risks and pairs each with practical defences.
How attackers approach an LLM application
1. Attack the prompt
Direct prompt injection and jailbreaks try to make the model ignore its instructions: reveal the system prompt, produce prohibited content, or behave in ways that embarrass the company.
Jailbreaks have become more sophisticated. In late July, researchers from Carnegie Mellon and the Center for AI Safety published a method for automatically generating adversarial suffixes, strings of seemingly random tokens that, appended to a request, cause aligned models to comply with harmful requests. Suffixes optimised against open models often transferred to commercial chatbots.
Defences: assume jailbreaks will succeed sometimes. Keep secrets out of prompts, apply output moderation, and limit what a jailbroken model can do.
2. Attack through the data
Indirect prompt injection plants instructions in content the model reads: web pages, documents in a knowledge base, emails or tickets. When the model processes that content, the attacker's instructions ride along.
Defences: treat retrieved content as untrusted, delimit it clearly, avoid giving models that read untrusted content access to sensitive tools, and require confirmation for actions.
3. Steal the data
Sensitive information disclosure can happen in several ways:
- The application retrieves documents the user should not see, because retrieval does not check permissions.
- The model reproduces sensitive data from fine-tuning or earlier context.
- Employees paste confidential data into third-party AI services. In April, Samsung reportedly restricted generative AI use after engineers shared internal source code and meeting notes with ChatGPT.
- Bugs in the AI platform itself leak data. In March, a bug in an open-source library briefly exposed some ChatGPT users' conversation titles and payment details to other users.
Defences: enforce access control at retrieval time, keep sensitive data out of training and prompts, set clear policies for staff use of AI tools, and choose providers with appropriate data handling terms.
4. Abuse the tools
When LLMs can call plugins and APIs, insecure plugin design and excessive agency become the main risks. A plugin that accepts free-text input and passes it to a database, or an assistant with permission to send email on a user's behalf, turns a successful injection into real-world action.
Defences: strict input schemas, least-privilege credentials per tool, user-level authorisation, and human approval for side effects.
5. Exploit the output
Insecure output handling occurs when model output is used without validation: rendered as HTML (cross-site scripting), executed as code, or used to build queries.
Defences: treat model output as untrusted user input. Encode before rendering, validate against schemas, and never execute it directly.
6. Attack availability and cost
Model denial of service: long, expensive prompts, recursive tasks or high request volumes can degrade service and run up large bills.
Defences: rate limits, token caps per request and user, timeouts and cost monitoring.
7. Attack the supply chain
Models, datasets, plugins and libraries all come from somewhere. Compromised or malicious components, or poisoned training data, can introduce vulnerabilities.
Defences: vet model sources, pin versions, scan dependencies and track what your application is built on.
A reference set of controls
flowchart LR
U[User input] --> IG[Input controls<br/>rate limits, size caps,<br/>abuse detection]
IG --> P[Prompt assembly<br/>delimited untrusted content,<br/>no secrets]
D[(Retrieval<br/>permission-filtered)] --> P
P --> M[LLM]
M --> OG[Output controls<br/>schema validation,<br/>moderation, encoding]
OG --> T{Tool call?}
T -->|yes| AZ[Authorisation in code<br/>+ human approval]
AZ --> Tools[Scoped tools]
T -->|no| R[Response to user]
M -.-> L[(Logging & monitoring)]Testing LLM applications
A security assessment of an LLM feature should include:
- system prompt extraction and jailbreak attempts,
- indirect injection through every content source the model reads,
- cross-user and cross-tenant data access through retrieval,
- tool misuse and privilege escalation through the model,
- output handling (XSS, injection into downstream systems), and
- cost and rate-limit abuse.
The bottom line
LLM applications combine a new, manipulable component with the old risks of web applications, APIs and data handling. The OWASP Top 10 for LLMs gives teams a shared vocabulary. The practical lesson is consistent across all ten: assume the model can be manipulated, and build the application so that a manipulated model cannot reach data or actions it should not.
Our application security testing covers every item on the OWASP LLM Top 10, and our agentic AI security team builds LLM applications around these controls.