Prompt Injection Attacks: Techniques, Examples and Layered Defenses

Summary
This guide explains how direct and indirect prompt injection exploits LLM context, with examples of data leakage and tool abuse. It outlines layered defenses for input handling, permissions, output, and continuous testing.
Key points
- The article says OWASP ranks prompt injection first in its 2026 Top 10 for LLM Applications and MITRE ATLAS maps it to AML.T0051.
- LLMs process system instructions and supplied content in the same context, allowing text treated as data to influence model behavior.
- Delivery surfaces include documents, email, webpages, tool outputs, repositories, images, and clipboard content; payloads may use hidden Unicode, encoding, or multilingual text.
- Cited demonstrations describe indirect injections that exposed private information through rendered links or images, and a Semantic Kernel example that ran code on its host.
- The article describes tool-call chains, persistent instructions in memory or rules files, and self-replicating email as ways an injection can extend beyond one response.
- It characterizes most prompt injections observed on public webpages as low impact so far, while warning that access to email, terminals, or payment tools raises the potential consequences.
- Recommended controls include limiting context and tool permissions, normalizing and screening inputs, validating tool parameters, sanitizing outputs, and testing defenses with adaptive multi-turn attacks.
Article Details
- Topic
- Prompt injection techniques, impacts, and layered defenses for LLM applications and agents
Indicators of compromise
| Type | Indicator | Context |
|---|---|---|
| URL | hxxps[:]//aiexecutiveorder[.]com?secret=confetti | Exfiltration link in a demonstrated Slack AI prompt injection; the payload instructed the model to substitute a private API key. |
| URL | hxxps[:]//asssistant-security[.]com/updates | Attacker-server URL used to fetch subsequent instructions in a demonstrated prompt-injection remote-control attack. |
MITRE ATT&CK
CVE
CVE-2025-32711Microsoft · Microsoft 365 CopilotIn EchoLeak (CVE-2025-32711), the entry point was an external email.CVE-2026-26030microsoft · semantic-kernelFor example, in May 2026, Microsoft researchers showed how a direct prompt could make an AI agent built with Microsoft's Semantic Kernel framework run code on its host (CVE-2026-26030).
People
Threat Actors
Malware
Vendors
GoogleIn an August 2024 Google AI Studio demonstration, researchers uploaded a file containing this payload [9]:MicrosoftFor example, in May 2026, Microsoft researchers showed how a direct prompt could make an AI agent built with Microsoft's Semantic Kernel framework run code on its host (CVE-2026-26030).PicusEffective AI red teaming requires continuous, adaptive, multi-turn testing, which Picus AI Security Validation delivers against guardrails and LLM firewalls.
Products
CodexIn a November 2026 case, a GitHub workflow in the openai/codex repository passed new issues to the Codex agent for labeling.CursorFor example, in the March 2025 Rules File Backdoor demonstration, researchers created a Cursor rule at .cursor/rules/html-best-practices.mdc.Gemini-CLIIn April 2026, researchers showed how a public GitHub issue could take over Google's gemini-cli repository.GitLab DuoFor example, in a 2025 GitLab Duo case, an HTML file in a public project contained a hex-encoded prompt.Google AI StudioIn an August 2024 Google AI Studio demonstration, researchers uploaded a file containing this payload [9]:Microsoft 365 CopilotMicrosoft 365 Copilot could find that email while answering a question about company information.Picus AI Security ValidationEffective AI red teaming requires continuous, adaptive, multi-turn testing, which Picus AI Security Validation delivers against guardrails and LLM firewalls.Semantic KernelFor example, in May 2026, Microsoft researchers showed how a direct prompt could make an AI agent built with Microsoft's Semantic Kernel framework run code on its host (CVE-2026-26030).Slack AIA similar attack was shown in Slack AI in August 2024.
Countries
RussiaFor example, in an August 2026 case, the Russia-aligned group UAC-0099 added these comments to a malicious VBS script used against a victim in Ukraine [15]:UkraineFor example, in an August 2026 case, the Russia-aligned group UAC-0099 added these comments to a malicious VBS script used against a victim in Ukraine [15]:
