← All articles
AI Security

OWASP Top 10 for LLM Applications Explained: A Practical Guide for Developers

Binjesoft · 6 November 2026 · 8 min read

In short

  • The OWASP Top 10 for LLM Applications is the most widely used checklist of security risks for apps built on large language models. The 2026 edition was published in August 2026.
  • Prompt injection is still number one. The biggest change: Excessive Agency jumped to number three, because AI agents now take real actions.
  • Most fixes are ordinary security engineering: least privilege, treating model output as untrusted, limits, and human approval for risky actions.

If you're adding a chatbot, an AI assistant or an agent to your product, you're also adding a new kind of attack surface. The model reads text from users, documents, websites and tools, and any of that text can try to steer it. This guide explains the 2026 OWASP Top 10 for LLM Applications in plain language and gives you concrete steps for each risk, so you can ship AI features without shipping new vulnerabilities.

What the OWASP Top 10 for LLM Applications is

OWASP, the open community behind the classic web application Top 10, runs the GenAI Security Project. Its Top 10 for LLM Applications ranks the most important security risks specific to software that uses large language models. It's free, vendor-neutral and updated as attacks evolve. The 2026 edition was published in August 2026 and announced at the start of September, with expanded mappings to NIST, MITRE ATLAS, CWE and OWASP's separate Top 10 for Agentic Applications.

Here is the 2026 list and how each entry moved compared with 2025:

#RiskChange from 2025
LLM01Prompt InjectionStill #1
LLM02Sensitive Information DisclosureStill #2
LLM03Excessive AgencyUp from #6
LLM04Supply ChainDown from #3
LLM05Data and Model PoisoningDown from #4
LLM06Unbounded ConsumptionUp from #10
LLM07MisinformationUp from #9
LLM08Hidden Context ExposureReplaces System Prompt Leakage, with a wider scope
LLM09Vector and Embedding WeaknessesDown from #8
LLM10Improper Output HandlingDown from #5

The direction of travel is clear: as models gain tools, memory and autonomy, the risks that matter most are the ones where an AI can do something harmful, not just say something wrong.

The ten risks and what to do about them

LLM01: Prompt Injection

An attacker gets instructions into the model's input so it ignores your rules. It can be direct ("ignore previous instructions…") or indirect: hidden text in a web page, email, PDF, image or tool response that your app feeds to the model. The 2026 edition explicitly covers images, audio, video and agent memory too.

  • Assume injection will sometimes succeed, and design so that a fooled model can't do much damage.
  • Keep untrusted content clearly separated from instructions, and give the model only the tools and data the current user is allowed to use.
  • Require human approval for consequential actions, and red team your prompts regularly.

LLM02: Sensitive Information Disclosure

The model reveals data it shouldn't: other customers' records, internal documents, credentials, or personal data that ended up in training data, logs or retrieved context.

  • Don't put data in the model's reach that the current user isn't allowed to see. Enforce access control before retrieval, not in the prompt.
  • Minimize personal data in prompts and logs, and mask or filter sensitive patterns in outputs.

LLM03: Excessive Agency

The model has more functions, permissions or autonomy than it needs, so a manipulated or mistaken model can delete data, send emails, move money or change settings. This is the biggest climber in 2026.

  • Give each tool the narrowest scope possible, and run tool calls with the user's permissions, not a powerful service account.
  • Check permissions at the moment a tool is called, not only at setup.
  • Add approval steps and circuit breakers for high-impact actions.

LLM04: Supply Chain

Risks from third-party models, datasets, fine-tuning adapters, plugins and libraries: tampered weights, malicious code in model files, unclear licenses.

  • Use models and datasets from trusted sources, pin versions, and keep an inventory of every model and component you depend on.
  • Remember that a signature proves where a model came from, not that it is safe. Test models before deploying them.

LLM05: Data and Model Poisoning

Attackers corrupt training, fine-tuning or retrieval data to plant backdoors, biases or false facts that persist.

  • Track where your data comes from, validate it before use, and version your datasets.
  • Test for unexpected behavior triggered by specific phrases or inputs.

LLM06: Unbounded Consumption

Uncontrolled usage drives up costs ("denial of wallet"), slows or crashes your service, or lets someone copy your model's behavior through mass queries. Agents that loop or call tools recursively make this worse.

  • Set token-aware rate limits, per-user quotas and spending caps.
  • Limit the number of steps and recursive calls in agent workflows, and alert on unusual usage.

LLM07: Misinformation

Confident but false or unsupported output, including hallucinated facts, code packages or citations, that people or systems then act on.

  • Ground answers in trusted sources and show those sources to users.
  • Verify claims before acting on them automatically, and put human review in front of high-stakes decisions.

LLM08: Hidden Context Exposure

This replaces "System Prompt Leakage". Anything in the model's context can potentially be extracted: system prompts, tool schemas, retrieved documents, agent memory and tool responses.

  • Assume users can discover everything in the context. Never put secrets, API keys or internal-only rules there.
  • Enforce authorization in your code, not in prompt instructions.

LLM09: Vector and Embedding Weaknesses

Problems specific to retrieval-augmented generation (RAG): one tenant's data showing up in another tenant's answers, poisoned documents in the index, or sensitive text reconstructed from embeddings.

  • Apply access controls and tenant separation inside your vector store, filtering by user before search.
  • Validate and track the documents you index, and treat retrieved text as untrusted input.

LLM10: Improper Output Handling

Model output is passed to a browser, database, shell or another system without validation, leading to cross-site scripting, SQL injection or command execution.

  • Treat every model output as untrusted user input: validate it, encode it for its destination, and use parameterized queries.
  • Ask the model for structured output (for example JSON with a fixed schema) and reject anything that doesn't match.

What it looks like in code

Many of these controls are a few lines of ordinary code. This simplified Python example shows three of them: an allowlist of tools (LLM03), authorization as the real user (LLM02 and LLM03), and escaping model output before showing it in a web page (LLM10).

import html
import json

# Only low-risk tools. Refunds and deletions are not available to the model.
ALLOWED_TOOLS = {"search_docs", "get_order_status"}

def run_tool_call(model_output: str, user, tools):
    """tools maps tool names to functions that check the user's own permissions."""
    call = json.loads(model_output)          # we asked the model for JSON only
    name = call.get("tool")
    if name not in ALLOWED_TOOLS:
        raise PermissionError(f"tool not allowed: {name!r}")
    args = call.get("args", {})
    if not isinstance(args, dict):
        raise ValueError("args must be an object")
    # Run as the signed-in user, never as an all-powerful service account
    return tools[name](user=user, **args)

def render_answer(text: str) -> str:
    # Never insert model output into a page as raw HTML
    return html.escape(text)

A pre-launch checklist

Before you ship an LLM feature, check that you can answer "yes" to each of these:

  1. We have a list of every place our app sends untrusted text (user input, documents, web pages, tool results) to a model.
  2. The model can only reach data the current user is allowed to see.
  3. Each tool has the minimum permissions it needs, and runs as the user.
  4. High-impact actions need human confirmation.
  5. No secrets or authorization rules live in prompts.
  6. Model output is validated and encoded before it reaches a browser, database or shell.
  7. We have rate limits, quotas, spending caps and step limits for agents.
  8. We know which models, datasets and libraries we use, and where they came from.
  9. Answers that matter are grounded in sources, and risky decisions get a human review.
  10. We log prompts and tool calls safely (without unnecessary personal data) and test with adversarial prompts before each release.

Where to start this week

Don't try to fix all ten at once. Start by mapping your AI features: what data each one can read, what tools it can call, and who uses it. Then pick the three risks that matter most for that map. For most teams that's Prompt Injection, Excessive Agency and Sensitive Information Disclosure. Finally, add a small set of adversarial test prompts to your test suite so regressions get caught automatically.

For Indonesian teams: if your AI feature handles personal data, Indonesia's Personal Data Protection Law (UU PDP) applies to prompts, logs and retrieved documents just like any other system. Data minimization and access control (LLM02, LLM08 and LLM09) help with compliance as well as security.

If your app uses AI agents, also read OWASP's separate Top 10 for Agentic Applications, which goes deeper into tools, memory and multi-agent risks.

Building an AI feature and want a second pair of eyes? Email Binjesoft for a review of your LLM app against the OWASP Top 10, or see our security services.

Sources: OWASP GenAI Security Project: LLM Top 10 2026 · OWASP announcement (September 2026) · Cloud Security Alliance research note · OWASP GenAI Security Project

Keamanan AI

OWASP Top 10 untuk Aplikasi LLM: Panduan Praktis bagi Developer

Binjesoft · 6 November 2026 · 8 menit baca

Ringkasnya

  • OWASP Top 10 for LLM Applications adalah daftar risiko keamanan yang paling banyak dipakai untuk aplikasi berbasis large language model (LLM). Edisi 2026 terbit pada Agustus 2026.
  • Prompt injection tetap di posisi pertama. Perubahan terbesar: Excessive Agency naik ke posisi ketiga, karena agen AI kini melakukan tindakan nyata.
  • Sebagian besar solusinya adalah praktik keamanan biasa: hak akses seminimal mungkin, memperlakukan keluaran model sebagai data tak tepercaya, pembatasan, dan persetujuan manusia untuk tindakan berisiko.

Jika Anda menambahkan chatbot, asisten AI, atau agen ke produk Anda, Anda juga menambahkan jenis celah serangan baru. Model membaca teks dari pengguna, dokumen, situs web, dan berbagai alat (tool), dan teks mana pun bisa berusaha mengarahkannya. Panduan ini menjelaskan OWASP Top 10 for LLM Applications 2026 dengan bahasa sederhana, lengkap dengan langkah konkret untuk setiap risiko, agar Anda bisa merilis fitur AI tanpa ikut merilis celah keamanan baru.

Apa itu OWASP Top 10 for LLM Applications

OWASP, komunitas terbuka di balik Top 10 aplikasi web yang terkenal, menjalankan GenAI Security Project. Top 10 for LLM Applications-nya mengurutkan risiko keamanan terpenting yang khusus ada pada perangkat lunak yang memakai large language model. Daftar ini gratis, netral terhadap vendor, dan diperbarui seiring berkembangnya serangan. Edisi 2026 terbit pada Agustus 2026 dan diumumkan awal September, dengan pemetaan yang lebih luas ke NIST, MITRE ATLAS, CWE, dan Top 10 for Agentic Applications milik OWASP.

Berikut daftar 2026 dan perubahan posisinya dibanding 2025:

#RisikoPerubahan dari 2025
LLM01Prompt InjectionTetap #1
LLM02Sensitive Information Disclosure (kebocoran informasi sensitif)Tetap #2
LLM03Excessive Agency (kewenangan berlebihan)Naik dari #6
LLM04Supply Chain (rantai pasok)Turun dari #3
LLM05Data and Model Poisoning (peracunan data dan model)Turun dari #4
LLM06Unbounded Consumption (pemakaian tanpa batas)Naik dari #10
LLM07Misinformation (misinformasi)Naik dari #9
LLM08Hidden Context Exposure (terbukanya konteks tersembunyi)Menggantikan System Prompt Leakage, dengan cakupan lebih luas
LLM09Vector and Embedding Weaknesses (kelemahan vektor dan embedding)Turun dari #8
LLM10Improper Output Handling (penanganan keluaran yang tidak tepat)Turun dari #5

Arahnya jelas: ketika model mendapat akses ke alat, memori, dan otonomi, risiko yang paling penting adalah saat AI bisa melakukan sesuatu yang merugikan, bukan sekadar mengatakan sesuatu yang salah.

Sepuluh risiko dan cara menanganinya

LLM01: Prompt Injection

Penyerang menyisipkan instruksi ke masukan model sehingga model mengabaikan aturan Anda. Bisa langsung ("abaikan instruksi sebelumnya…") atau tidak langsung: teks tersembunyi di halaman web, email, PDF, gambar, atau respons alat yang diteruskan aplikasi Anda ke model. Edisi 2026 secara eksplisit juga mencakup gambar, audio, video, dan memori agen.

  • Anggap injeksi kadang akan berhasil, lalu rancang sistem agar model yang tertipu tidak bisa menimbulkan banyak kerusakan.
  • Pisahkan konten tak tepercaya dari instruksi dengan jelas, dan berikan model hanya alat dan data yang boleh diakses pengguna saat itu.
  • Wajibkan persetujuan manusia untuk tindakan penting, dan uji prompt Anda secara rutin dengan pendekatan red teaming.

LLM02: Sensitive Information Disclosure

Model membocorkan data yang seharusnya tidak: data pelanggan lain, dokumen internal, kredensial, atau data pribadi yang masuk ke data pelatihan, log, atau konteks yang diambil.

  • Jangan letakkan data dalam jangkauan model jika pengguna saat itu tidak berhak melihatnya. Terapkan kontrol akses sebelum pengambilan data, bukan lewat prompt.
  • Kurangi data pribadi di prompt dan log, serta samarkan atau saring pola sensitif pada keluaran.

LLM03: Excessive Agency

Model punya fungsi, izin, atau otonomi lebih dari yang dibutuhkan, sehingga model yang dimanipulasi atau keliru bisa menghapus data, mengirim email, memindahkan uang, atau mengubah pengaturan. Inilah risiko yang naik paling tinggi di 2026.

  • Beri setiap alat cakupan sesempit mungkin, dan jalankan pemanggilan alat dengan izin pengguna, bukan akun layanan yang berkuasa penuh.
  • Periksa izin pada saat alat dipanggil, bukan hanya saat konfigurasi awal.
  • Tambahkan langkah persetujuan dan pemutus darurat (circuit breaker) untuk tindakan berdampak besar.

LLM04: Supply Chain

Risiko dari model, dataset, adapter fine-tuning, plugin, dan pustaka pihak ketiga: bobot model yang diubah, kode berbahaya di berkas model, atau lisensi yang tidak jelas.

  • Gunakan model dan dataset dari sumber tepercaya, kunci versinya, dan catat semua model dan komponen yang Anda pakai.
  • Ingat bahwa tanda tangan digital membuktikan asal model, bukan keamanannya. Uji model sebelum dipakai.

LLM05: Data and Model Poisoning

Penyerang merusak data pelatihan, fine-tuning, atau data yang diambil untuk menanam pintu belakang, bias, atau fakta palsu yang bertahan lama.

  • Lacak asal data Anda, validasi sebelum dipakai, dan beri versi pada dataset.
  • Uji apakah ada perilaku aneh yang dipicu frasa atau masukan tertentu.

LLM06: Unbounded Consumption

Pemakaian yang tidak terkendali membuat biaya membengkak (denial of wallet), memperlambat atau menjatuhkan layanan, atau memungkinkan seseorang meniru perilaku model lewat kueri massal. Agen yang berulang-ulang memanggil alat memperparah risiko ini.

  • Tetapkan batas laju berbasis token, kuota per pengguna, dan batas pengeluaran.
  • Batasi jumlah langkah dan pemanggilan berulang dalam alur kerja agen, dan pasang peringatan untuk pemakaian yang tidak wajar.

LLM07: Misinformation

Keluaran yang terdengar meyakinkan tetapi salah atau tanpa dasar, termasuk fakta, paket kode, atau kutipan rekaan, yang kemudian dipercaya orang atau sistem.

  • Dasarkan jawaban pada sumber tepercaya dan tampilkan sumber itu kepada pengguna.
  • Verifikasi klaim sebelum ditindaklanjuti secara otomatis, dan libatkan tinjauan manusia untuk keputusan penting.

LLM08: Hidden Context Exposure

Ini menggantikan "System Prompt Leakage". Apa pun di dalam konteks model berpotensi dibongkar: system prompt, skema alat, dokumen yang diambil, memori agen, dan respons alat.

  • Anggap pengguna bisa mengetahui seluruh isi konteks. Jangan pernah menaruh rahasia, API key, atau aturan internal di sana.
  • Terapkan otorisasi di kode Anda, bukan lewat instruksi di prompt.

LLM09: Vector and Embedding Weaknesses

Masalah khusus pada retrieval-augmented generation (RAG): data satu pelanggan muncul di jawaban pelanggan lain, dokumen beracun di indeks, atau teks sensitif yang bisa direkonstruksi dari embedding.

  • Terapkan kontrol akses dan pemisahan antarpelanggan di dalam vector store, dengan menyaring berdasarkan pengguna sebelum pencarian.
  • Validasi dan lacak dokumen yang Anda indeks, dan perlakukan teks yang diambil sebagai masukan tak tepercaya.

LLM10: Improper Output Handling

Keluaran model diteruskan ke browser, basis data, shell, atau sistem lain tanpa validasi, sehingga memicu cross-site scripting, SQL injection, atau eksekusi perintah.

  • Perlakukan setiap keluaran model seperti masukan pengguna yang tak tepercaya: validasi, enkode sesuai tujuannya, dan gunakan kueri berparameter.
  • Minta model menghasilkan keluaran terstruktur (misalnya JSON dengan skema tetap) dan tolak yang tidak sesuai.

Contohnya dalam kode

Banyak kontrol ini hanya beberapa baris kode biasa. Contoh Python sederhana berikut menunjukkan tiga di antaranya: daftar alat yang diizinkan (LLM03), otorisasi sebagai pengguna sebenarnya (LLM02 dan LLM03), dan meng-escape keluaran model sebelum ditampilkan di halaman web (LLM10).

import html
import json

# Hanya alat berisiko rendah. Refund dan penghapusan tidak tersedia bagi model.
ALLOWED_TOOLS = {"search_docs", "get_order_status"}

def run_tool_call(model_output: str, user, tools):
    """tools memetakan nama alat ke fungsi yang memeriksa izin pengguna itu sendiri."""
    call = json.loads(model_output)          # kita meminta model hanya mengirim JSON
    name = call.get("tool")
    if name not in ALLOWED_TOOLS:
        raise PermissionError(f"tool not allowed: {name!r}")
    args = call.get("args", {})
    if not isinstance(args, dict):
        raise ValueError("args must be an object")
    # Jalankan sebagai pengguna yang login, bukan akun layanan berkuasa penuh
    return tools[name](user=user, **args)

def render_answer(text: str) -> str:
    # Jangan pernah memasukkan keluaran model ke halaman sebagai HTML mentah
    return html.escape(text)

Daftar periksa sebelum rilis

Sebelum merilis fitur LLM, pastikan Anda bisa menjawab "ya" untuk setiap poin berikut:

  1. Kami punya daftar semua tempat aplikasi mengirim teks tak tepercaya (masukan pengguna, dokumen, halaman web, hasil alat) ke model.
  2. Model hanya bisa menjangkau data yang boleh dilihat pengguna saat itu.
  3. Setiap alat punya izin seminimal mungkin dan berjalan sebagai pengguna.
  4. Tindakan berdampak besar memerlukan konfirmasi manusia.
  5. Tidak ada rahasia atau aturan otorisasi di dalam prompt.
  6. Keluaran model divalidasi dan dienkode sebelum masuk ke browser, basis data, atau shell.
  7. Ada batas laju, kuota, batas pengeluaran, dan batas langkah untuk agen.
  8. Kami tahu model, dataset, dan pustaka apa yang dipakai, serta asal-usulnya.
  9. Jawaban penting didasarkan pada sumber, dan keputusan berisiko ditinjau manusia.
  10. Kami mencatat prompt dan pemanggilan alat dengan aman (tanpa data pribadi yang tidak perlu) dan menguji dengan prompt serangan sebelum setiap rilis.

Mulai dari mana minggu ini

Jangan mencoba membereskan sepuluh risiko sekaligus. Mulailah dengan memetakan fitur AI Anda: data apa yang bisa dibaca, alat apa yang bisa dipanggil, dan siapa penggunanya. Lalu pilih tiga risiko yang paling relevan dengan peta itu. Bagi kebanyakan tim, ketiganya adalah Prompt Injection, Excessive Agency, dan Sensitive Information Disclosure. Terakhir, tambahkan sekumpulan kecil prompt serangan ke rangkaian pengujian Anda agar kemunduran keamanan tertangkap otomatis.

Untuk tim di Indonesia: jika fitur AI Anda mengolah data pribadi, UU Pelindungan Data Pribadi (UU PDP) berlaku untuk prompt, log, dan dokumen yang diambil, sama seperti sistem lainnya. Minimalisasi data dan kontrol akses (LLM02, LLM08, dan LLM09) membantu kepatuhan sekaligus keamanan.

Jika aplikasi Anda memakai agen AI, baca juga Top 10 for Agentic Applications dari OWASP, yang membahas lebih dalam risiko alat, memori, dan sistem multi-agen.

Sedang membangun fitur AI dan butuh pemeriksaan kedua? Kirim email ke Binjesoft untuk meninjau aplikasi LLM Anda berdasarkan OWASP Top 10, atau lihat layanan keamanan kami.

Sumber: OWASP GenAI Security Project: LLM Top 10 2026 · Pengumuman OWASP (September 2026) · Catatan riset Cloud Security Alliance · OWASP GenAI Security Project

Have a project in mind?

Tell us about it — we usually reply within one business day.

hello@binjesoft.com