AIcurity
Open navigation menu

OWASP Top 10 for LLM Applications

LLM applications integrate language models into software to perform tasks such as generating content, answering questions, summarizing information, and processing data.

They process untrusted inputs, retrieve data, and generate outputs, introducing security risks throughout the AI application lifecycle.

The OWASP Top 10 for LLM Applications identifies ten key security risks and provides guidance on prevention and mitigation. It covers vulnerabilities such as prompt injection, sensitive information disclosure, excessive agency, supply-chain risks, data and model poisoning, and improper output handling.

LLM Top 10 at a Glance

OWASP LLM Top 10 at a Glance

Figure illustrates how LLM attack vectors can pass through mechanisms that amplify their effects, ultimately impacting confidentiality, integrity, and availability. Some supply-chain attacks can cause direct impacts.

LLM01. Prompt Injection

Prompt Injection occurs when direct or indirect input changes an LLM’s behavior in ways the application did not intend. Inputs can originate from users, retrieved documents, web pages, tool outputs, images, audio, video, or persistent memory.

Successful attacks can cause sensitive-data disclosure, unauthorized tool use, data exfiltration, or persistent compromise through memory and RAG systems.

Prevention and Mitigations

  • Apply least privilege to tools, data, and actions.
  • Treat external content and memory as untrusted.
  • Validate inputs and outputs outside the model.
  • Require approval for privileged or irreversible actions.

LLM02. Sensitive Information Disclosure

Sensitive Information Disclosure occurs when an LLM application exposes confidential, regulated, privileged, or proprietary information through outputs or other observable channels.

Disclosure can occur through model outputs, retrieved data, tool arguments, reasoning traces, logs, embeddings, training artifacts, or side channels such as timing and token-length information.

Prevention and Mitigations

  • Minimize sensitive data in prompts, context, and logs.
  • Enforce authorization, isolation, and encryption.
  • Classify and redact sensitive outputs and traces.
  • Test continuously for unintended disclosure.

LLM03. Excessive Agency

Excessive Agency occurs when an LLM-based application has excessive functionality, permissions, or autonomy, allowing unexpected or manipulated model outputs to cause damaging actions.

The impact depends on what systems the LLM can access and what actions it can perform.

Prevention and Mitigations

  • Minimize tools, permissions, and capabilities.
  • Enforce authorization outside the model.
  • Require approval for high-impact actions.
  • Monitor tool use and apply execution limits.

LLM04. Supply Chain

LLM Supply Chain vulnerabilities affect models, datasets, adapters, packages, conversion pipelines, and deployment platforms.

Compromised or tampered components can introduce malicious behavior, vulnerabilities, backdoors, or system compromise.

Prevention and Mitigations

  • Vet third-party models and dependencies.
  • Track components and verify provenance.
  • Sign and verify models and artifacts.
  • Continuously evaluate supply-chain components.

LLM05. Data and Model Poisoning

Data and Model Poisoning occurs when attackers or unsafe processes manipulate training data, fine-tuning data, embeddings, models, or other AI artifacts to introduce harmful behavior, bias, backdoors, or degraded performance.

Poisoning can occur during pre-training, fine-tuning, embedding creation, RAG ingestion, model distribution, or continuous-learning processes.

Prevention and Mitigations

  • Validate data and maintain provenance.
  • Isolate untrusted data and sources.
  • Monitor for anomalous or malicious content.
  • Control retraining and model updates.

LLM06. Unbounded Consumption

Unbounded Consumption occurs when an LLM application lacks adequate controls over resource consumption, enabling denial of service, excessive costs, or model extraction.

The risk is amplified by reasoning models, multimodal inputs, and long contexts, which can increase computational resource consumption.

Prevention and Mitigations

  • Limit requests, tokens, and spending.
  • Set execution, token, and resource budgets.
  • Monitor for resource-abuse patterns.
  • Harden inference infrastructure.

LLM07. Misinformation

Misinformation occurs when an LLM application produces incorrect, incomplete, unsupported, or misleading information that appears credible enough to influence decisions or actions.

Prevention and Mitigations

  • Ground outputs in trusted sources.
  • Verify claims and tool outputs.
  • Distinguish facts from assumptions.
  • Test and monitor high-impact outputs.

LLM08. Hidden Context Exposure

Hidden Context Exposure occurs when system instructions, developer prompts, tool schemas, policies, or other non-user-facing context are extracted or reconstructed in ways that materially increase attacker capability.

Prevention and Mitigations

  • Assume hidden context can be discovered.
  • Keep sensitive information out of model context.
  • Enforce security controls outside the model.
  • Test for context extraction.

LLM09. Vector and Embedding Weaknesses

Vector and Embedding Weaknesses affect applications that use embeddings and similarity search, including RAG systems, semantic caches, and vector-backed memory.

Attacks can exploit embedding-space behavior to cause data leakage, retrieval poisoning, retrieval denial, membership inference, or cross-tenant information exposure.

Prevention and Mitigations

  • Enforce tenant isolation and authorization.
  • Validate and track data provenance.
  • Detect poisoning and anomalous retrieval.
  • Protect vector stores and access paths.

LLM10. Improper Output Handling

Improper Output Handling occurs when LLM-generated content is passed to downstream systems without appropriate validation, sanitization, or context-specific encoding.

Depending on the destination, unsafe output can result in XSS, SQL injection, SSRF, path traversal, privilege escalation, remote code execution, or data exfiltration.

Prevention and Mitigations

  • Treat model outputs as untrusted input.
  • Validate, sanitize, and encode outputs.
  • Restrict dangerous operations and network access.
  • Monitor downstream use of model outputs.