Skip to content

07 OWASP Top 10 for LLM Applications

Large Language Model applications introduce security risks that traditional web and application security frameworks do not always fully describe.

Modern AI applications may combine:

  • Large Language Models
  • Enterprise data
  • Retrieval-Augmented Generation
  • Vector databases
  • AI agents
  • External tools
  • APIs
  • Cloud infrastructure
  • Third-party models
  • Model supply chains

Security teams therefore need a structured way to identify and communicate common risks affecting these systems.

One of the most useful references is the:

OWASP GenAI LLM Top 10

The OWASP GenAI Security Project maintains guidance covering important risks affecting applications powered by Large Language Models and Generative AI.

For an AI Security Engineer, the important objective is not to memorize ten names.

The objective is to understand:

Where does each risk appear in an architecture, how could it create security impact, and what controls should reduce that risk?

By the end of this lesson, you should be able to:

  • Explain the purpose of the OWASP GenAI LLM Top 10.
  • Understand the major LLM security risk categories.
  • Recognize these risks inside enterprise AI architectures.
  • Distinguish between model-level and application-level weaknesses.
  • Understand how LLM risks connect with traditional cybersecurity.
  • Identify appropriate preventive and detective controls.
  • Use OWASP during AI architecture reviews.
  • Use OWASP during threat modeling.
  • Use OWASP during AI security assessments.
  • Map security findings to OWASP categories.
  • Avoid treating the OWASP Top 10 as a simple compliance checklist.

The current 2026 structure is:

ID Risk
LLM01 Prompt Injection
LLM02 Sensitive Information Disclosure
LLM03 Excessive Agency
LLM04 Supply Chain
LLM05 Data and Model Poisoning
LLM06 Unbounded Consumption
LLM07 Misinformation
LLM08 Hidden Context Exposure
LLM09 Vector and Embedding Weaknesses
LLM10 Improper Output Handling

These categories help security engineers organize common security problems across the LLM application lifecycle.

The OWASP LLM Top 10 does not mean:

Secure These 10 Things
AI System Is Secure

Instead, think:

OWASP Top 10
Security Awareness
Architecture Review
Threat Identification
Security Testing
Control Design

It is a starting point for security analysis.

It does not replace:

  • Threat modeling

  • Application security

  • Cloud security

  • IAM

  • Data security

  • API security

  • Security monitoring

  • Risk management

A useful mental model is:

INPUT
└── LLM01 Prompt Injection
DATA
├── LLM02 Sensitive Information Disclosure
└── LLM05 Data and Model Poisoning
AGENTS
└── LLM03 Excessive Agency
SUPPLY CHAIN
└── LLM04 Supply Chain
RESOURCES
└── LLM06 Unbounded Consumption
TRUST
├── LLM07 Misinformation
└── LLM08 Hidden Context Exposure
RAG
└── LLM09 Vector and Embedding Weaknesses
OUTPUT
└── LLM10 Improper Output Handling

Now let’s understand each category.

Prompt Injection occurs when input influences an LLM in unintended ways.

The input may attempt to override, manipulate or redirect expected behavior.

A simplified attack path is:

Trusted Application Instructions
+
Untrusted Input
LLM
Unexpected Behavior

Prompt injection can be:

  • Direct

  • Indirect

A user directly provides manipulative instructions.

Conceptually:

User
Malicious Prompt
LLM
Unexpected Behavior

For example, an attacker may attempt to cause an AI application to ignore its intended task.

The security problem becomes more serious when the LLM has access to:

  • Sensitive data

  • Enterprise APIs

  • AI agents

  • External tools

The malicious instruction arrives through another data source.

For example:

Malicious Document
RAG
LLM
Unexpected Behavior

Possible sources include:

  • Documents

  • Websites

  • Emails

  • Search results

  • Database content

  • Tool responses

The user may never see the malicious instruction.

Imagine an AI assistant summarizes external webpages.

User
AI Assistant
External Website
LLM

A website contains instructions intended for the AI rather than the human reader.

If the model follows those instructions, the external site has influenced application behavior.

Prompt Injection may contribute to:

  • Sensitive data exposure

  • Unauthorized actions

  • Security control bypass

  • Manipulated output

  • Agent tool abuse

Defenses may include:

  • Treat external content as untrusted.

  • Separate instructions from data where possible.

  • Minimize privileges.

  • Restrict agent capabilities.

  • Apply authorization outside the model.

  • Validate high-impact actions.

  • Monitor suspicious behavior.

Important principle:

Prompt defenses alone should never be responsible for protecting critical assets.

LLM02 — Sensitive Information Disclosure

Section titled “LLM02 — Sensitive Information Disclosure”

Sensitive Information Disclosure occurs when an LLM application exposes information that should remain protected.

Sensitive information may include:

  • Personal information

  • Financial information

  • Customer records

  • Source code

  • Security architecture

  • Internal documents

  • API credentials

  • Proprietary information

Employee
Enterprise AI Assistant
RAG
Confidential HR Document
Unauthorized Disclosure

The model may only be the final component delivering the information.

The actual weakness might exist in authorization, retrieval or data handling.

Possible causes include:

  • Excessive model context

  • Weak RAG authorization

  • Poor data classification

  • Cross-user data exposure

  • Sensitive information inside prompts

  • Insecure logging

  • Improper access control

Important controls include:

Only provide information required for the task.

Prevent unauthorized data from reaching the model.

Understand which information is:

Public
Internal
Confidential
Restricted

Avoid unnecessarily recording sensitive prompts and responses.

Validate whether sensitive information may be returned.

The strongest principle is:

If a user is not authorized to access information, avoid giving that information to the model in the first place.

Modern AI systems increasingly use agents that can perform actions.

Examples include:

Read Email
Create Ticket
Query Database
Modify Cloud Resource
Execute Code
Send Message

Excessive Agency exists when the system gives an LLM-based application too much:

  • Functionality

  • Permission

  • Autonomy

Requirement:

AI Assistant should read cloud security alerts.

Actual permission:

Cloud Administrator

This creates excessive agency.

Consider:

Prompt Injection
AI Agent
Administrator Permission
Production Environment

A model behavior problem has now become an infrastructure security problem.

Does the agent have tools it does not need?

Do those tools have more permissions than necessary?

Can the system perform high-impact actions without approval?

User
AI Agent
Restricted Tool
Least Privilege
Human Approval for High-Risk Actions

Apply:

  • Least privilege

  • Tool allowlists

  • Restricted functions

  • Scoped service identities

  • Human approval

  • Strong logging

  • Transaction limits

  • Action validation

One of the most important AI Security Engineer principles is:

The model should never have more authority than its business function requires.

AI applications depend on complex supply chains.

An enterprise AI system may include:

Models
+
Datasets
+
Python Packages
+
Containers
+
Libraries
+
Frameworks
+
APIs
+
Plugins
+
Cloud Services

Compromise of any dependency can affect the final application.

External Model
Model Repository
AI Application
Production

If the model is malicious or tampered with, the organization may introduce the problem into production itself.

  • Malicious models

  • Vulnerable libraries

  • Compromised packages

  • Unsafe model adapters

  • Compromised containers

  • Untrusted datasets

  • Third-party AI providers

  • CI/CD compromise

Before adopting a component, ask:

Where did it come from?
Who maintains it?
What version are we using?
Has it been reviewed?
Can integrity be verified?
What permissions does it require?
How will vulnerabilities be tracked?

Organizations should consider:

  • Trusted repositories

  • Dependency scanning

  • Model provenance

  • Artifact integrity

  • Software inventories

  • AI Bills of Materials where appropriate

  • Version control

  • Secure CI/CD

  • Vendor assessment

The security principle is:

Do not automatically trust an AI component because it is popular or publicly available.

AI systems depend heavily on data.

Attackers may attempt to manipulate:

  • Training data

  • Fine-tuning data

  • Embedding data

  • RAG documents

  • Models

This can change how the AI behaves.

Trusted Dataset
+
Malicious Data
Training
Manipulated Model
Attacker
Malicious Document
Enterprise Knowledge Base
Embedding
Vector Database
RAG
LLM

The attacker may influence model responses without directly attacking the model itself.

Poisoning may cause:

  • Incorrect responses

  • Hidden backdoors

  • Manipulated decisions

  • Biased output

  • Unsafe model behavior

  • Security control bypass

Important controls include:

  • Trusted data sources

  • Data provenance

  • Restricted ingestion

  • Integrity validation

  • Dataset versioning

  • Model versioning

  • Change approval

  • Monitoring for unexpected behavior

AI Security Engineers should ask:

Who can change what the AI learns from or retrieves from?

LLM applications can consume significant:

  • CPU

  • GPU

  • Memory

  • Tokens

  • API calls

  • Cloud resources

  • Financial budget

If usage is not controlled, attackers or accidental usage may exhaust resources.

Attacker
Thousands of Large Requests
LLM API
High Token Consumption
Cost Increase / Service Degradation

Unbounded consumption can lead to:

  • Denial of service

  • Unexpected cloud bills

  • API quota exhaustion

  • Performance degradation

  • Model extraction attempts

  • Reduced availability

Consider:

  • Rate limiting

  • User quotas

  • Token limits

  • Request size limits

  • Timeouts

  • Budget controls

  • Cost monitoring

  • Abuse detection

For AI systems:

Cost protection is also a security consideration.

LLMs can generate responses that appear confident but are:

  • Incorrect

  • Incomplete

  • Misleading

  • Fabricated

This becomes a security issue when users or automated systems rely on those responses for important decisions.

Security Engineer
AI Assistant
Incorrect Firewall Recommendation
Engineer Trusts Output
Security Control Weakened

The problem is not simply that the AI produced an incorrect answer.

The security problem appears because the output influences a security-sensitive decision.

Misinformation becomes particularly important when AI is used for:

  • Security configuration

  • Incident response

  • Healthcare

  • Financial decisions

  • Legal analysis

  • Code generation

  • Infrastructure changes

Use:

  • Human validation

  • Trusted source grounding

  • RAG where appropriate

  • Citation and provenance

  • Confidence and uncertainty handling

  • Independent validation

  • High-risk action approval

The key principle is:

AI output should be treated as information requiring appropriate verification, not unquestionable truth.

Modern LLM applications often send significantly more information to the model than the user sees.

Hidden context may include:

System Instructions
+
Internal Policies
+
Conversation Memory
+
Retrieved Documents
+
Tool Definitions
+
Application Metadata
+
Intermediate Reasoning Data

This hidden context may contain information the organization does not intend to expose.

Application
├── System Instructions
├── Internal Workflow
├── Tool Metadata
└── Sensitive Context
LLM
User

If information from the hidden context becomes observable through output or application behavior, the security boundary may fail.

Organizations sometimes assume:

User Cannot See It
=
It Is Secure

That is not a safe assumption.

Information provided to the model should be considered potentially influenceable or exposable depending on application architecture and model behavior.

Apply:

  • Context minimization

  • Avoid embedding secrets in hidden instructions

  • Separate security controls from prompts

  • Limit sensitive metadata

  • Enforce access outside the model

  • Carefully manage conversation memory

  • Review tool descriptions and internal context

A useful rule is:

Do not place information in LLM context that the model does not need to perform its task.

RAG applications frequently use embeddings and vector databases.

Typical architecture:

Enterprise Documents
Embedding Model
Vector Database
Retriever
LLM

Security weaknesses in this layer may expose sensitive information or manipulate retrieval.

A user may retrieve documents they should not access.

One customer’s information may become visible to another.

Malicious content may enter the retrieval system.

Vector databases may contain sensitive metadata.

Too much information may be passed to the LLM.

Engineering User
RAG Search
Vector Database
Executive HR Documents

The user’s authentication may work correctly.

The problem is that retrieval authorization failed.

Important controls include:

  • Document-level authorization

  • Tenant isolation

  • Secure ingestion

  • Data classification

  • Vector database authentication

  • Private network access

  • Retrieval filtering

  • Metadata protection

  • Monitoring

Important principle:

RAG must preserve the organization’s existing authorization model.

LLM-generated output is not automatically safe.

An LLM may generate:

  • HTML

  • SQL

  • Source code

  • Shell commands

  • API requests

  • URLs

  • Configuration

  • Structured data

Problems arise when another system trusts or executes this content without validation.

User Input
LLM
Generated SQL
Application Executes SQL

The LLM has effectively become part of a command-generation pipeline.

LLM
Generated Shell Command
Automation Platform
Production Server

If output is trusted automatically, security impact can become significant.

Generated output should be treated similarly to other untrusted input.

Apply:

  • Output validation

  • Encoding

  • Sanitization

  • Parameterized operations

  • Allowlisted actions

  • Sandboxing

  • Least privilege

  • Human approval where appropriate

Important principle:

AI-generated content does not become trusted simply because your own application generated it.

Individual categories often interact.

Consider this attack chain:

Malicious Document
LLM01 Prompt Injection
RAG
LLM03 Excessive Agency
AI Agent
LLM10 Improper Output Handling
External Tool
Sensitive Information Disclosure

Real security incidents may involve multiple categories rather than exactly one.

This is why the OWASP Top 10 should be used as a thinking framework.

Imagine an organization deploys:

Security Analyst
AI Security Assistant
├── LLM
├── RAG
│ └── Security Runbooks
└── AI Agent
├── SIEM
├── Cloud
└── Ticketing

Let’s evaluate it using the OWASP categories.

Can user or retrieved input manipulate the assistant?

LLM02 — Sensitive Information Disclosure

Section titled “LLM02 — Sensitive Information Disclosure”

Can confidential incident information be exposed?

Can the agent perform unnecessary cloud actions?

Are models, dependencies and libraries trusted?

Can malicious runbooks enter the RAG knowledge base?

Can users generate unlimited expensive requests?

Could incorrect security advice influence incident response?

Does the model receive internal instructions or metadata that should not be exposed?

Can analysts retrieve security documents outside their authorization?

Can generated commands be automatically executed?

You have now performed a basic OWASP-based AI security review.

You can also map categories to architecture layers.

USER
└── LLM01 Prompt Injection
APPLICATION
├── LLM02 Sensitive Information Disclosure
├── LLM08 Hidden Context Exposure
└── LLM10 Improper Output Handling
LLM
└── LLM07 Misinformation
RAG
├── LLM05 Data and Model Poisoning
└── LLM09 Vector and Embedding Weaknesses
AGENT
└── LLM03 Excessive Agency
PLATFORM
├── LLM04 Supply Chain
└── LLM06 Unbounded Consumption

This is not an exclusive mapping.

Many categories span multiple layers.

Suppose a new AI project is proposed.

Start with:

Business Use Case
Architecture Diagram
Data Flow Diagram
Trust Boundaries
OWASP Risk Review

For every category ask:

Does this risk apply?

Where could it occur?

What controls currently exist?

Are those controls sufficient?

OWASP Risk Applicable? Existing Control Gap
Prompt Injection Yes Prompt filtering Agent still overprivileged
Sensitive Information Disclosure Yes SSO RAG authorization missing
Excessive Agency Yes Service account Permissions excessive
Supply Chain Yes Dependency scanning Models not tracked
Data & Model Poisoning Yes Restricted upload No document provenance
Unbounded Consumption Yes Authentication No user quota
Misinformation Yes Human review None for automated workflow
Hidden Context Exposure Yes None Sensitive context present
Vector & Embedding Weaknesses Yes Private DB Tenant filtering incomplete
Improper Output Handling Yes None Output sent directly to tool

This converts OWASP into actionable engineering work.

OWASP can help generate threat scenarios.

Example:

Asset:
Production Cloud Account
Entry Point:
AI Assistant Prompt
OWASP Risk:
Prompt Injection
Related Risk:
Excessive Agency
Attack Path:
Prompt
LLM
Agent
Cloud Tool
Production Action

Now ask:

  • What prevents this?

  • How would it be detected?

  • What would the impact be?

  • What additional controls are required?

This is more useful than merely marking:

LLM01 = Applicable

A security assessment might use categories to organize test cases.

Example:

LLM01
Test Prompt Handling
LLM02
Test Data Exposure
LLM03
Test Agent Permissions
LLM04
Review Dependencies
LLM05
Test Knowledge Integrity
LLM06
Test Usage Controls
LLM07
Evaluate High-Risk Output Reliability
LLM08
Review Hidden Context
LLM09
Test RAG Authorization
LLM10
Test Output Processing

This creates a structured methodology.

Security findings can reference relevant categories.

Example:

Finding:
AI Agent Has Excessive Cloud Permissions
OWASP Mapping:
LLM03 — Excessive Agency
Risk:
A manipulated AI workflow may perform actions
outside the intended business function.
Recommendation:
Replace administrator permissions with a
restricted read-only security role.

This helps communicate findings consistently.

Do not assume:

LLM01
=
More Severe Than LLM10

The numbering represents categories and prioritization in the framework.

The actual severity of a finding depends on the organization’s architecture and business context.

For example:

Prompt Injection
+
No Sensitive Data
+
No Tools

may have limited impact.

While:

Excessive Agency
+
Production Administrator Access
+
Automated Actions

could create very high impact.

Always evaluate the actual scenario.

Risk = Architecture + Exposure + Privilege + Impact

Section titled “Risk = Architecture + Exposure + Privilege + Impact”

A useful engineering mindset is:

Security Risk
Weakness
+
Exposure
+
Privilege
+
Data Sensitivity
+
Business Impact

OWASP identifies the type of problem.

Your job is to determine its importance in the real environment.

Do not attempt to solve each category with one control.

For example, Prompt Injection cannot be addressed only with:

Prompt Filter

A stronger architecture might include:

Authentication
Authorization
Context Minimization
Prompt Controls
LLM
Restricted Agent
Tool Authorization
Human Approval
Monitoring

This reduces the impact even if manipulation reaches the model.

Security Controls Should Exist Outside the Model

Section titled “Security Controls Should Exist Outside the Model”

This is one of the most important principles in the entire lesson.

Weak:

System Prompt:
"Never access confidential data."

Strong:

User Identity
Authorization
Confidential Data Not Retrieved

Weak:

System Prompt:
"Never delete cloud resources."

Strong:

AI Agent Identity
No Delete Permission

The application should technically enforce important security boundaries wherever possible.

Zero Trust principles work well with AI Security.

Do not automatically trust:

User Input
Retrieved Documents
Model Output
Agent Decisions
Tool Output
External APIs
Third-Party Models

Instead:

Verify
Authorize
Restrict
Monitor

OWASP risks should be considered throughout development.

Design
Threat Model
OWASP Review
Develop
Security Test
Deploy
Monitor

This is better than waiting until production.

Knowing the names does not mean you can secure an application.

Mistake 2 — Treating OWASP as a Compliance Checklist

Section titled “Mistake 2 — Treating OWASP as a Compliance Checklist”

Checking ten boxes does not prove the architecture is secure.

Mistake 3 — Looking Only for Prompt Injection

Section titled “Mistake 3 — Looking Only for Prompt Injection”

AI Security contains many other risks.

Mistake 4 — Ignoring Traditional Security

Section titled “Mistake 4 — Ignoring Traditional Security”

IAM, APIs, cloud security and application security remain essential.

Mistake 5 — Assuming System Prompts Are Security Boundaries

Section titled “Mistake 5 — Assuming System Prompts Are Security Boundaries”

Important controls should be enforced outside the model.

The same category can have very different severity in different architectures.

Mistake 7 — Mapping Every Finding to Only One Category

Section titled “Mistake 7 — Mapping Every Finding to Only One Category”

Real attack chains may involve several OWASP risks.

Mistake 8 — Using an Old OWASP List Without Checking the Version

Section titled “Mistake 8 — Using an Old OWASP List Without Checking the Version”

AI security guidance changes quickly.

Always identify which version your assessment or document uses.

AI Security Engineer OWASP Review Checklist

Section titled “AI Security Engineer OWASP Review Checklist”
  • Is untrusted input identified?

  • Can external content influence the model?

  • Are high-impact actions protected independently?

LLM02 — Sensitive Information Disclosure

Section titled “LLM02 — Sensitive Information Disclosure”
  • Is sensitive data classified?

  • Is authorization enforced before retrieval?

  • Is unnecessary context minimized?

  • Are agent tools necessary?

  • Are permissions least privileged?

  • Are high-risk actions approved?

  • Are models trusted?

  • Are dependencies tracked?

  • Are artifacts validated?

  • Are data sources trusted?

  • Is document ingestion controlled?

  • Are models and datasets versioned?

  • Are rate limits configured?

  • Are token limits defined?

  • Are costs monitored?

  • Are high-impact outputs verified?

  • Is human review required where necessary?

  • Are trustworthy sources used?

  • Is unnecessary hidden context minimized?

  • Are secrets excluded from prompts?

  • Is conversation memory appropriately protected?

  • Is RAG authorization enforced?

  • Is tenant isolation implemented?

  • Is the vector database protected?

  • Is model output validated?

  • Can generated output execute directly?

  • Are downstream systems least privileged?

You may be asked:

What is the OWASP Top 10 for LLM Applications?

A strong answer is:

The OWASP GenAI LLM Top 10 is a security awareness and guidance framework covering important risks affecting applications built with Large Language Models and Generative AI. I use it as part of architecture review, threat modeling and security testing rather than treating it as a standalone compliance checklist.

Another question may be:

Which OWASP LLM risk would concern you most in an AI agent?

A strong answer is:

Excessive Agency would be particularly important because an agent may have tools and permissions that allow it to affect enterprise systems. I would review its functionality, permissions and autonomy, apply least privilege and require independent approval for high-impact actions. Prompt Injection would also be important because manipulated input could potentially influence how those capabilities are used.

Another question may be:

How would you prevent sensitive information disclosure from a RAG application?

A strong answer is:

I would enforce authorization before retrieval so that the model only receives documents the authenticated user is permitted to access. I would also apply data classification, context minimization, tenant isolation and appropriate logging rather than relying only on a system prompt telling the model not to reveal confidential information.

Another question may be:

Why is Improper Output Handling dangerous?

A strong answer is:

Because LLM output may become input to another system. If generated SQL, commands, HTML, code or API arguments are trusted without validation, the model can become part of an injection or execution path. Model output should therefore be treated according to its trust level and validated before sensitive use.

When reviewing an AI application, use:

1. Draw Architecture
2. Identify Assets
3. Identify Trust Boundaries
4. Map OWASP Risks
5. Identify Controls
6. Identify Gaps
7. Test Controls
8. Assess Impact
9. Recommend Remediation
10. Retest

This turns OWASP from theory into security engineering.

The current OWASP GenAI LLM Top 10 covers:

LLM01 — Prompt Injection
LLM02 — Sensitive Information Disclosure
LLM03 — Excessive Agency
LLM04 — Supply Chain
LLM05 — Data and Model Poisoning
LLM06 — Unbounded Consumption
LLM07 — Misinformation
LLM08 — Hidden Context Exposure
LLM09 — Vector and Embedding Weaknesses
LLM10 — Improper Output Handling

Do not memorize the names without understanding the architecture.

Instead learn:

Risk
Where Does It Exist?
What Can Exploit It?
What Asset Is Affected?
What Is the Business Impact?
What Prevents It?
How Do We Detect It?

The most important lesson is:

OWASP gives you a structured way to think about LLM security, but secure AI requires combining OWASP with architecture review, threat modeling, IAM, application security, cloud security, data security and monitoring.

➡️ 08 — MITRE ATLAS

OWASP helps us understand important categories of AI application security risk.

The next lesson changes perspective.

Instead of asking:

What vulnerabilities should we look for?

we will ask:

How might an adversary actually attack an AI system?

You will learn how MITRE ATLAS helps security teams understand adversarial behavior against Artificial Intelligence and Machine Learning systems.

You will explore:

  • What MITRE ATLAS is

  • Why it exists

  • AI adversary tactics

  • AI attack techniques

  • Reconnaissance

  • Initial access

  • ML supply-chain compromise

  • Data poisoning

  • Model manipulation

  • Prompt injection

  • Model extraction

  • Defense evasion

  • Exfiltration

  • Impact

  • Mapping AI attack paths

  • Using ATLAS with threat modeling

  • Using ATLAS with OWASP

  • Using ATLAS during AI security assessments

You will move from:

OWASP
"What security risks exist?"
MITRE ATLAS
"How might an adversary attack?"

Together, these frameworks will give you a much stronger foundation for the later AI Threat Modeling and AI Red Teaming modules.

➡️ Next: 08 — MITRE ATLAS