L1Level
GuestNOT RANKED
0 XPsign in to earn
🔥 build a streak🪙 earn coins53 articles

Latest in Prompt Injection

Prompt injection: the complete guide

Prompt injection is the most common way AI applications are attacked. This guide explains what it is, how it works, what it has done in real systems and how to defend against it. Every technique has a free lab you can play in your browser.

What is prompt injection?

Prompt injection is giving an AI system text that changes its behaviour against the wishes of whoever built it. A developer writes instructions for the assistant. A user, a document or a web page then supplies more text. The model reads all of it as one stream and cannot always tell whose instructions should win.

It is the first entry, LLM01, in the OWASP Top 10 for LLM Applications 2025. It holds that position because every application built on a language model is exposed to it, and because most other attacks on AI systems begin with it.

Direct and indirect prompt injection

Direct prompt injection is typed by the person using the AI. They ask the assistant to ignore its rules, reveal its hidden instructions or act outside its purpose.

Indirect prompt injection is more serious. The attacker never talks to the AI. They place instructions in something it will read later: an email, a web page, a support ticket, a code comment, a file. When a user asks the AI to work on that content, the AI may follow the planted instructions with that user's access.

Why prompt injection is hard to fix

In a traditional application, code and data are kept apart. A database knows which part of a query is the command and which part is the value. A language model has no such separation. Instructions and data are both just text.

Filters help and none is complete, because there are unlimited ways to phrase an instruction. For that reason the defences that work best do not try to detect every injection. They limit what an injected model is able to do.

Real prompt injection incidents

These cases were disclosed in 2025. Each links to its original report.

EchoLeak in Microsoft 365 CopilotJune 2025

Aim Security disclosed EchoLeak (CVE-2025-32711). A single crafted email carried hidden instructions that Copilot later read as part of its context. Copilot then placed internal data into a link that the client loaded automatically, so nothing had to be clicked. Microsoft fixed it on the server side and said it had seen no exploitation.

Source: The Hacker News

GitHub MCP server and a malicious public issueMay 2025

Invariant Labs showed that an issue filed on a public repository could steer a coding agent connected through the GitHub MCP server. When the developer asked the agent to look at open issues, it followed the text inside one, read private repositories and published their contents in a public pull request.

Source: Invariant Labs

Supabase MCP and a poisoned support ticketJuly 2025

Researchers showed a Cursor agent connected to Supabase with the service-role key reading a customer support ticket that contained instructions. The agent ran SQL with its own full privileges and wrote private integration tokens back into the ticket thread, where the attacker could read them.

Source: Simon Willison

Perplexity Comet followed instructions on a web pageAugust 2025

Brave found that Comet's "summarise this page" feature passed page content to the model without separating it from the user's request. Hidden text in a Reddit comment could direct the browser agent to open the user's email and retrieve a one-time login code.

Source: Brave

ForcedLeak in Salesforce AgentforceSeptember 2025

Noma Security placed instructions in the description field of a public Web-to-Lead form. When an employee later asked the agent about that lead, it followed them and sent CRM data to a domain that was still on Salesforce's allow-list although it had expired. The researchers bought it for five dollars.

Source: The Hacker News

CamoLeak in GitHub Copilot ChatOctober 2025

Legit Security hid instructions in a pull request comment that Copilot Chat read when a developer asked about the change. Copilot then leaked private source code and secrets through image addresses routed via GitHub's own image proxy. GitHub switched off image rendering in Copilot Chat.

Source: Legit Security

False long-term memories planted in GeminiFebruary 2025

Johann Rehberger showed that a document with hidden instructions could make Gemini save false information to a user's long-term memory. The instructions waited for ordinary words the user was likely to type later, which got round the guard against tools running straight from untrusted content.

Source: InfoQ

What prompt injection leads to

Once an attacker can steer the model, the result depends on what the model can reach.

How to defend against prompt injection

  • Give the model the least access it needs. An assistant with no tools and no secrets has little to give away.
  • Do not combine private data, untrusted content and an outbound channel in one session. Remove one of the three.
  • Mark outside content clearly as data, and tell the model it is never a command.
  • Require a person to approve actions that send data, spend money or change records, and show them the real action.
  • Check outputs before they are shown or acted on, and treat them as untrusted in the rest of the application.
  • Keep secrets out of prompts altogether.
  • Test your own application with injection attempts, and repeat the tests when the model or prompt changes.

Questions people ask

What is prompt injection in simple terms?

It is tricking an AI by giving it text that it treats as instructions. The text can be typed by the user or hidden in content the AI reads.

Is prompt injection the same as jailbreaking?

They overlap but are not the same. Jailbreaking tries to get around the safety rules built into the model. Prompt injection tries to override the instructions of the application built on top of it.

Can prompt injection be prevented completely?

Not with current models. It can be made much harder and far less damaging by limiting what the model can access and do.

What is indirect prompt injection?

An attack where the instructions arrive inside content the AI reads on a user's behalf, such as a web page or an email, and not from the user.

How do I practise prompt injection legally?

Use labs built for the purpose. The labs on this page run in your browser against practice targets, so nothing real is attacked.

More guides: LLM Jailbreaking · OWASP LLM Top 10 · AI red team certification · All free labs

All 53 articles

  1. Day 5 Real MCP Attacks 2026 — Four Case Studies Dissected End to End | MCP Security Day 5 of 7 ⏱ 30 min 📅 Oct 2026 ⚡ +10 XP
  2. Day 4 MCP Tool Poisoning — Real 2026 Rug Pull Attack Guide | MCP Security Day 4 of 7 ⏱ 46 min 📅 Oct 2026 ⚡ +10 XP
  3. Day 3 Prompt Injection through MCP — The Complete 2026 Beginner’s Guide | MCP Security Day 3 of 7 ⏱ 59 min 📅 Oct 2026 ⚡ +10 XP
  4. Day 2 MCP Attack Surface — The 2026 Beginner’s Complete Map | MCP Security — Day 2 of 7 ⏱ 39 min 📅 Oct 2026 ⚡ +10 XP
  5. Day 4 AI Agent Security Risks — How Agents Get Hacked and Cause Harm | AI Agents Course Day 4 of 5 ⏱ 20 min 📅 Aug 2026 ⚡ +10 XP
  6. Day 36 Advanced Agentic AI Security 2026 — Multi-Agent Attack Guide | AI LLM Hacking Course Day 36 of 90 ⏱ 49 min 📅 Aug 2026 ⚡ +10 XP
  7. Day 35 AI Security Automation 2026 — CI/CD LLM Security Testing Guide | AI LLM Hacking Course Day 35 of 90 ⏱ 47 min 📅 Aug 2026 ⚡ +10 XP
  8. Day 34 How to Assess Multimodal AI Security in 2026 | AI LLM Hacking Course Day 34 of 90 ⏱ 41 min 📅 Aug 2026 ⚡ +10 XP
  9. Day 4 Prompt Injection Attacks — From Prompt Engineering to Exploitation | Part 4 ⏱ 18 min 📅 Jun 2026 ⚡ +10 XP
  10. Day 22 How to Execute Advanced Prompt Injection Chains | AI/LLM Hacking Course Day 22 ⏱ 16 min 📅 Jun 2026 ⚡ +10 XP
  11. Day 4 How Hackers Attack AI Systems — 6 Real Attack Types Explained Simply (2026) | AI Basics Day 4 ⏱ 18 min 📅 Jun 2026 ⚡ +10 XP
  12. #12 GPT-4 Attack Techniques — A Security Researcher’s Complete Breakdown ⏱ 17 min 📅 Jun 2026 ⚡ +10 XP
  13. #13 ChatGPT Security Vulnerabilities — What Ethical Hackers Found in 2026 ⏱ 18 min 📅 Jun 2026 ⚡ +10 XP
  14. #14 LLM Hacking Tutorial — How Security Researchers Break Language Models (2026) ⏱ 17 min 📅 May 2026 ⚡ +10 XP
  15. Day 17 How to Use Burp Suite for LLM Security Testing | Day17 ⏱ 15 min 📅 May 2026 ⚡ +10 XP
  16. Day 16 How to Build an Automated Prompt Injection Testing Pipeline | Day 16 ⏱ 4 min 📅 May 2026 ⚡ +10 XP
  17. #17 How to Hack AI Models — The Complete Ethical Security Guide ⏱ 20 min 📅 May 2026 ⚡ +10 XP
  18. #18 AI API Authorization Vulnerabilities 2026 — Broken Access Control in LLM APIs ⏱ 15 min 📅 May 2026 ⚡ +10 XP
  19. #19 What Is Prompt Injection? The Attack That Breaks AI Assistants (2026) ⏱ 11 min 📅 May 2026 ⚡ +10 XP
  20. #20 Can AI Be Hacked? 10 Ways How Hackers Hack AI Systems in 2026 ⏱ 12 min 📅 May 2026 ⚡ +10 XP
  21. #21 Prompt Injection in RAG Systems 2026 — How Attackers Poison AI Knowledge Bases ⏱ 16 min 📅 May 2026 ⚡ +10 XP
  22. Day 5 Indirect Prompt Injection 2026 — Web-Delivered Attacks That Hijack AI Without User Input | AI LLM Hacking Course Day 5 ⏱ 23 min 📅 May 2026 ⚡ +10 XP
  23. #23 Insecure AI Plugin Architecture Attacks 2026 — When Tools Become Weapons ⏱ 15 min 📅 May 2026 ⚡ +10 XP
  24. #24 AI Code Assistant Backdoor Injection 2026 — When Copilot Writes Malicious Code ⏱ 15 min 📅 May 2026 ⚡ +10 XP
  25. #25 AI Deepfake Penetration Testing 2026 — Synthetic Media in Offensive Security ⏱ 15 min 📅 Apr 2026 ⚡ +10 XP
  26. #26 OWASP Top 10 LLM Vulnerabilities 2026 — Red Team Assessment Framework + Real Exploits ⏱ 19 min 📅 Apr 2026 ⚡ +10 XP
  27. #27 AI Application API Key Theft via Prompt Injection 2026 — Credential Extraction Attacks ⏱ 16 min 📅 Apr 2026 ⚡ +10 XP
  28. Day 4 LLM01 Prompt Injection 2026 — Complete Attack Guide | AI LLM Hacking Course Day4 ⏱ 20 min 📅 Apr 2026 ⚡ +10 XP
  29. #29 Prompt Injection in Agentic Workflows 2026 — When AI Agents Act on Malicious Instructions ⏱ 17 min 📅 Apr 2026 ⚡ +10 XP
  30. Day 3 OWASP LLM Top 10 — The Complete Hacker’s Guide to Every Vulnerability | AI LLM Hacking Course Day3 ⏱ 22 min 📅 Apr 2026 ⚡ +10 XP
  31. #31 MCP Server Attacks on AI Assistants 2026 — Tool Poisoning and Context Injection ⏱ 17 min 📅 Apr 2026 ⚡ +10 XP
  32. Day 2 How LLMs Work — Transformer Architecture, Tokens & Context Windows | AI LLM Hacking Course Day2 ⏱ 21 min 📅 Apr 2026 ⚡ +10 XP
  33. Day 1 The AI Security Landscape 2026 — Why Every Ethical Hacker Needs to Learn LLM Hacking Now | AI LLM Hacking Course Day 1 ⏱ 22 min 📅 Apr 2026 ⚡ +10 XP
  34. #34 Model Poisoning Attacks 2026 — How AI Models Get Hacked From Inside ⏱ 14 min 📅 Apr 2026 ⚡ +10 XP
  35. #35 Gemini Advanced Prompt Injection Vulnerabilities 2026 — Research Findings ⏱ 16 min 📅 Apr 2026 ⚡ +10 XP
  36. #36 AI Chatbot Data Exfiltration 2026 — How Prompt Injection Leaks User Data ⏱ 16 min 📅 Apr 2026 ⚡ +10 XP
  37. #37 AI-Powered Social Engineering 2026 — How Generative AI Makes Phishing More Dangerous ⏱ 16 min 📅 Apr 2026 ⚡ +10 XP
  38. #38 Autonomous AI Agents Attack Surface 2026 — Security Risks of Agentic AI ⏱ 18 min 📅 Apr 2026 ⚡ +10 XP
  39. #39 AI Content Filter Bypass 2026 — How Researchers Test Safety Filtering Systems ⏱ 17 min 📅 Apr 2026 ⚡ +10 XP
  40. #40 Training Data Poisoning 2026 — How Attackers Corrupt AI Models Before Deployment ⏱ 17 min 📅 Apr 2026 ⚡ +10 XP
  41. #41 Prompt Leaking 2026 — System Prompt Extraction Techniques and Defences ⏱ 18 min 📅 Apr 2026 ⚡ +10 XP
  42. #42 AI Red Teaming Guide 2026 — How Security Teams Test LLM Applications ⏱ 18 min 📅 Apr 2026 ⚡ +10 XP
  43. #43 Microsoft Copilot Prompt Injection 2026 — Enterprise AI’s Biggest Security Risk ⏱ 22 min 📅 Apr 2026 ⚡ +10 XP
  44. #44 Indirect Prompt Injection 2026 — When Web Pages Attack Your AI Agent ⏱ 21 min 📅 Apr 2026 ⚡ +10 XP
  45. #45 AI Supply Chain Attacks 2026 — How Hackers Poison Models Before You Deploy Them ⏱ 20 min 📅 Apr 2026 ⚡ +10 XP
  46. #46 How Hackers Steal Your ChatGPT Conversation History — And How to Stop It ⏱ 9 min 📅 Apr 2026 ⚡ +10 XP
  47. #47 GPT-4o Vision Hacking — How Attackers Inject Prompts Through Images ⏱ 12 min 📅 Apr 2026 ⚡ +10 XP
  48. #48 10 Prompt Injection Payloads Every Security Researcher Must Know in 2026 ⏱ 8 min 📅 Apr 2026 ⚡ +10 XP
  49. #49 LLM Hacking 101 — How to Find Vulnerabilities in AI Systems (Ethical Hacker’s Guide 2026) ⏱ 12 min 📅 Apr 2026 ⚡ +10 XP
  50. #50 I Hacked a Company Using Only AI Prompts — Real Bug Bounty Case Study 2026 ⏱ 9 min 📅 Apr 2026 ⚡ +10 XP
  51. #51 Prompt Injection Attacks 2026 — How One Sentence Can Hijack Any AI Assistant ⏱ 12 min 📅 Apr 2026 ⚡ +10 XP
  52. #52 Google Vertex AI Was Vulnerable to Agent Hijacking — Here’s What the Security Flaw Reveals About AI Attack Surfaces in 2026 ⏱ 24 min 📅 Apr 2026 ⚡ +10 XP
  53. #53 Prompt Injection Attack & LLM Hacking 2026 — How Hackers Attack AI Systems (Complete Guide) ⏱ 12 min 📅 Apr 2026 ⚡ +10 XP
Found this useful? Share it.
Make it count. Join free to earn XP for what you read and solve, keep a streak, and track your progress.
Join free