appsec.fyi

AI — A Practical Guide

A curated AppSec resource library covering XSS, SQLi, SSRF, IDOR, RCE, XXE, OSINT, and more.

AI: A Practical Guide

Curated and synthesized by . Last updated 2026-07-01. Synthesized from 529 of 529 curated resources. Browse all 529 AI resources →

Problem Framing: The Evolving Threat Landscape

The rapid integration of AI, particularly Large Language Models (LLMs) and AI agents, into application development and operations introduces a novel and expanding attack surface. Traditional application security paradigms are insufficient to address these new vectors, necessitating a re-evaluation of how we secure systems that leverage AI capabilities.

AI systems can be compromised through various means, including manipulation of their inputs (prompt injection), corruption of their training data (data poisoning), direct theft of models, and exploitation of vulnerabilities within the AI infrastructure itself. Furthermore, AI-generated code can introduce its own set of security flaws, often mirroring or exacerbating existing software weaknesses.

The increasing autonomy of AI agents, coupled with their ability to interact with and control external tools, amplifies the potential impact of successful attacks. A compromised agent can execute unauthorized actions, exfiltrate sensitive data, or even initiate complex attack chains that were previously the domain of highly skilled human adversaries. This shift requires a proactive approach to understanding and mitigating AI-specific risks.

Key risk categories include prompt injection (direct and indirect), supply chain attacks targeting AI artifacts and dependencies, data exfiltration, remote code execution, and the compromise of AI agent credentials and system access. Understanding these core threats is foundational for developing effective defenses.

Core Mechanics of AI Security Vulnerabilities

Prompt Injection: Manipulating AI Behavior

Prompt injection is a class of vulnerabilities where an attacker crafts malicious input that manipulates the behavior of an AI model, particularly LLMs. This manipulation can lead to a variety of adverse outcomes, including:

Direct vs. Indirect Prompt Injection

Direct prompt injection involves an attacker directly interacting with the AI model, crafting a prompt to elicit a malicious response. This is akin to traditional input validation bypasses but targets the AI's instruction-following capabilities.

Indirect prompt injection (IPI) is more insidious. It involves embedding malicious instructions within external content that the AI model subsequently processes. This can occur through various channels:

IPI exploits the AI's inability to reliably distinguish between trusted developer instructions and untrusted data inputs, a fundamental challenge often referred to as the "instruction/data boundary collapse" [11].

Data Poisoning: Corrupting the AI's Knowledge

Data poisoning involves manipulating the training data used by AI models. This can degrade the model's performance, introduce biases, or embed backdoors that can be triggered later.

Model Theft and Inversion: Stealing or Reconstructing AI Assets

Model theft involves the direct exfiltration of trained AI models, which represent significant intellectual property and development investment [19].

Model inversion attacks aim to reconstruct sensitive training data from the outputs of a deployed AI model. This can reveal proprietary information or PII that was used during training [2].

Supply Chain Attacks in the AI Ecosystem

The AI development and deployment lifecycle relies on a complex ecosystem of libraries, SDKs, models, and infrastructure. This introduces numerous supply chain vulnerabilities:

Exploiting AI-Generated Code

AI coding assistants can introduce vulnerabilities into software development workflows. Studies indicate a significant percentage of AI-generated code snippets contain common weaknesses (CWEs) [36]. Up to 40% of AI-generated code may contain security flaws [24][37]. These flaws can include business logic errors, authorization issues, and injection vulnerabilities, sometimes at a higher rate than human-written code [38][39][40][41].

Notable Techniques and Attack Vectors

Prompt Injection Variants and Exploitations

AI Agentic Threats

Supply Chain Attacks and Infrastructure Exploitation

Infrastructure and Cloud Security for AI

Detection and Prevention Strategies

Shifting Left with AI-Native Security

The imperative is to integrate security earlier into the AI development lifecycle. This involves:

Runtime Protection and Monitoring

Continuous monitoring and runtime defenses are essential to detect and respond to AI-specific threats:

AI Security Posture Management (AI-SPM)

AI-SPM tools provide a centralized view and control plane for managing AI security risks across an organization's AI landscape.

Supply Chain Security for AI Assets

Securing the AI software supply chain requires specific measures:

Tooling for AI Security

A growing ecosystem of tools is emerging to address AI-specific security challenges:

Recent Developments and Emerging Trends

AI-Driven Vulnerability Discovery and Exploitation

Frontier AI models, such as Anthropic's Claude Mythos, are demonstrating the ability to autonomously discover zero-day vulnerabilities and generate working exploits with alarming speed [22][115]. This accelerates the CVE discovery process and necessitates a paradigm shift in how security teams respond, moving from detection to proactive control and rapid patching [53].

The Rise of Agentic AI and its Security Implications

Autonomous AI agents operating in development workflows and enterprise environments present unique challenges. Prompt injection, tool poisoning, and memory manipulation are key vectors for compromising these agents. The "Comment and Control" vulnerability class on GitHub Actions highlights how malicious comments can hijack AI agents, leading to API key theft [49][50]. The Model Context Protocol (MCP) is a critical infrastructure component for these agents, and vulnerabilities within it are highly impactful [25][26][61][7].

Indirect Prompt Injection as a Universal Threat

IPI is recognized as a pervasive threat affecting both cloud-based and local AI models due to the collapse of the instruction/data boundary [11][13][6]. Real-world examples like EchoLeak in Microsoft 365 Copilot demonstrate its potential for zero-click data exfiltration [15].

Supply Chain Attacks Evolve with AI

Attackers are increasingly weaponizing AI coding agents and poisoning AI dependencies. The PromptMink campaign, involving malicious npm packages co-authored by Claude Opus, exemplifies how AI can be integrated into sophisticated supply chain attacks [116]. The compromise of AI frameworks like LiteLLM and MCP SDKs underscores the need for deep visibility into the AI supply chain [58][25][60].

AI as Both Attacker and Defender

The landscape is seeing a dual role for AI: it's used by attackers to discover and exploit vulnerabilities at scale [22][56], and by defenders for automated threat hunting, vulnerability analysis, and incident response [83][84][85][82]. Tools like Wiz Red Agent simulate attacker behavior for offensive security testing, while Microsoft Security Copilot aids in defensive operations [110][111][117].

Where to Go Deeper

To stay abreast of this rapidly evolving field, consider the following resources:

Sources cited in this guide

  1. Prompt injection protection: Detecting and blocking malicious AI instructions — acronis.com
  2. AI Security 101: Mapping the AI Attack Surface — wiz.io
  3. Detecting AI-specific threats in Claude Enterprise from the Compliance API: a prefilter + LLM-as-judge pipeline with Sigma rules — papermtn.co.uk
  4. The New Threat Landscape: AI-Native Apps and Agentic Workflows — snyk.io
  5. Researchers Uncover 10 In-the-Wild Prompt Injection Payloads Targeting AI Agents — infosecurity-magazine.com
  6. Fooling AI Agents: Web-Based Indirect Prompt Injection Observed in the Wild — unit42.paloaltonetworks.com
  7. A Timeline of Model Context Protocol (MCP) Security Breaches — authzed.com
  8. Indirect Prompt Injection: The Hidden Threat — lakera.ai
  9. AI Agent Security in 2026: Prompt Injection and Memory Poisoning — swarmsignal.net
  10. The emerging use of malware invoking AI — wiz.io
  11. Indirect Prompt Injection Exposes a Universal AI Security Flaw No Deployment Model Is Immune — futurumgroup.com
  12. Indirect Prompt Injection remains a fundamental security challenge for AI — brave.com
  13. Indirect Prompt Injection Is Now a Real-World AI Security Threat — techrepublic.com
  14. SearchLeak: How We Turned M365 Copilot Into a One-Click Data Exfiltration Weapon — varonis.com
  15. EchoLeak: First Real-World Zero-Click Prompt Injection Exploit — arxiv.org
  16. MCP Security: Tool Poisoning Attacks - Invariant Labs — invariantlabs.ai
  17. MCP Security Vulnerabilities: Prompt Injection and Tool Poisoning — practical-devsecops.com
  18. Introduction to Data Poisoning: A 2026 Perspective — lakera.ai
  19. Introducing the Snyk AI Security Platform — snyk.io
  20. Weaponizing AI Coding Agents for Malware in the Nx Malicious Package Security Incident — snyk.io
  21. Snyk Finds Prompt Injection in 36%, 1467 Malicious Payloads in a ToxicSkills Study of Agent Skills Supply Chain Compromise — snyk.io
  22. Claude Mythos: Preparing for a World Where AI Finds and Exploits Vulnerabilities Faster Than Ever — wiz.io
  23. Securing the Agent Skills Registry: How Snyk and Tessl Are Setting the Standard — snyk.io
  24. Welcome-to-The New Era of AI-Driven Development — snyk.io
  25. The Mother of All AI Supply Chains: Critical Systemic Vulnerability at the Core of Anthropics MCP — ox.security
  26. MCP Supply Chain Advisory: RCE Vulnerabilities Across the AI Ecosystem — ox.security
  27. The Vulnerable MCP Project: Comprehensive MCP Security Database — vulnerablemcp.info
  28. MCP Auto-Execution: From Git Clone to Cloud Compromise in Amazon Q VS Code Extension — wiz.io
  29. NVIDIAScape - Critical NVIDIA AI Vulnerability: A Three-Line Container Escape in NVIDIA Container Toolkit (CVE-2025-23266) — wiz.io
  30. Breaking NVIDIA Triton: CVE-2025-23319 - A Vulnerability Chain Leading to AI Server Takeover — wiz.io
  31. OpenClaw’s Skill Marketplace and the Emerging AI Supply Chain Threat — unit42.paloaltonetworks.com
  32. Assessing Automated Prompt Injection Attacks in Agentic Environments — arxiv.org
  33. Trust No Skill: Integrity Verification for AI Agent Supply Chains — unit42.paloaltonetworks.com
  34. 280+ Leaky Skills: How OpenClaw & ClawHub Are Exposing API Keys and PII — snyk.io
  35. What nearly 10,000 developer environments reveal about agentic development risk — snyk.io
  36. Why You Need a Security Companion for AI-Generated Code — snyk.io
  37. Meeting the AI Mandates with Confidence: Why Federal Teams Trust Snyk — snyk.io
  38. AI Is Reshaping Software. Is Your Security Strategy Keeping Up? — snyk.io
  39. Introducing the AI Security Fabric: Empowering Software Builders in the Era of AI — snyk.io
  40. AI Is Building Your Attack Surface. Are You Testing It? — snyk.io
  41. Is 46% of your AI-generated code vulnerable? — techzine.eu
  42. Exposure Report: 65% of Leading AI Companies Found with Verified Secret Leaks — wiz.io
  43. Microsoft Copilot: From Prompt Injection to Exfiltration of Personal Information · Embrace The Red — embracethered.com
  44. EchoGram: Bypassing AI Guardrails via Token Flip Attacks - HiddenLayer — hiddenlayer.com
  45. Could Sock Puppeting Be the New Trick Jailbreaking Major LLMs? — the420.in
  46. Single Line of Code Can Jailbreak 11 AI Models Including ChatGPT, Claude, Gemini — cyberpress.org
  47. Prompt Injection and LLM Jailbreaks: Defenses — blockchain-council.org
  48. How AI Red Teaming Fixes Vulnerabilities in Your AI Systems — invisibletech.ai
  49. AI agents on GitHub leak API keys via prompt injection — techzine.eu
  50. Agents hooked into GitHub can steal creds but Anthropic Google and Microsoft haven't warned users — theregister.com
  51. The Dark Side of LLMs: Agent-based Attacks for Complete Computer Takeover — arxiv.org
  52. ServiceNow's Virtual Agent Vulnerability Shows Why AI Security Needs Traditional AppSec Foundations — snyk.io
  53. Governing Security in the Age of Infinite Signal – From Discovery to Control — snyk.io
  54. AI Agent Security: Automating Workflow Without Creating Prompt Injection or Data Leak Risks — hackread.com
  55. Six AI Vulnerabilities Three Attack Patterns One Dangerous Service Gap — msspalert.com
  56. When LLMs Autonomously Attack - CMU Research — engineering.cmu.edu
  57. Agentic Browser Security: 2025 Year-End Review — wiz.io
  58. CVE-2026-42208: LiteLLM SQL Injection Leaks Upstream API Keys — abhs.in
  59. Fresh LiteLLM Vulnerability Exploited Shortly After Disclosure — securityweek.com
  60. LangChain Langflow LiteLLM: When AI's Foundation Code Becomes the Attack Surface — securityboulevard.com
  61. Anthropic's Model Context Protocol includes a critical remote code execution vulnerability newly discovered exploit puts 200000 AI servers at risk — tomshardware.com
  62. Cursor AI Vulnerability Enables Remote Code Execution — letsdatascience.com
  63. Prompt injection turned Googles Antigravity file search into RCE — csoonline.com
  64. Protestware by open source maintainer to hinder agentic coding: The jqwik 1.10.0 Prompt Injection — snyk.io
  65. Wiz Research finds architecture risks that may compromise AI-as-a-Service providers and consequently risk customer data; works with Hugging Face on mitigations — wiz.io
  66. The risk in malicious AI models: Wiz Research discovers critical vulnerability in AI-as-a-Service provider, Replicate — wiz.io
  67. Hunting Account Takeovers in the Wild West of MCP OAuth Servers" — blog.sicks3c.io
  68. AI Threat Readiness Pillar 3: Perform AI Code Analysis Natively in Wiz — wiz.io
  69. Snyk Security Solution Now Integrated into Google Cloud's Gemini Code Assist — snyk.io
  70. Secure at Inception: Introducing New Tools for Securing AI-Native Development — snyk.io
  71. From Ideas to Impact: How the Bay Area Is Shaping the Future of Secure AI — snyk.io
  72. Securing AI Agents with Wiz AI-SPM — wiz.io
  73. Welcome to Snyk Labs: Charting the Course for AI-Native Security — snyk.io
  74. Evo Adds CycloneDX Support to Give Full AI Visibility — snyk.io
  75. Building AI Trust with Snyk Code and Snyk Agent Fix — snyk.io
  76. OWASP LLM Prompt Injection Prevention Cheat Sheet — cheatsheetseries.owasp.org
  77. Detecting and analyzing prompt abuse in AI tools — microsoft.com
  78. What Is Prompt Injection in AI? Examples & Prevention | EC-Council — eccouncil.org
  79. LLM01:2025 Prompt Injection | OWASP Gen AI Security — genai.owasp.org
  80. You cant patch your way out of prompt injection: AI agents need a different defense — hackread.com
  81. How Microsoft Defends Against Indirect Prompt Injection Attacks — microsoft.com
  82. Key Takeaways from the 2026 State of AI in the Cloud Report — wiz.io
  83. How AI Is Rewriting the SecOps Playbook — wiz.io
  84. Improve MTTR with Wiz’s AI-powered remediation guidance using Microsoft Azure OpenAI service — wiz.io
  85. Empower and Accelerate Your SOC with the Blue Agent — wiz.io
  86. OpenAI Launches Lockdown Mode Against Prompt Injection Attacks — techbuzz.ai
  87. MCP Safety Audit: LLMs with MCP Allow Major Security Exploits — arxiv.org
  88. New Prompt Injection Attack Vectors Through MCP Sampling — unit42.paloaltonetworks.com
  89. fr0gger/proximity: Proximity is a MCP security scanner powered with NOVA — github.com
  90. The MCP Security Tool You Probably Need - MCP Snitch — adversis.io
  91. Introducing Wiz AI Application Protection Platform (AI-APP) — wiz.io
  92. Building AI Security with Our Customers: 5 Lessons from Evo’s Design Partner Program — snyk.io
  93. Generative AI Security: Risks & Best Practices — wiz.io
  94. Wiz extends its AI-SPM offering to OpenAI platform — wiz.io
  95. Wiz AI-SPM extends support to Microsoft Azure OpenAI Service models — wiz.io
  96. Our AI Agent Now Has a Security Conscience: Introducing the JFrog Plugin for Claude Code — jfrog.com
  97. How to Validate Policy-as-Code Without Breaking Builds (Even When AI Writes the Code) — jfrog.com
  98. Secure Your AI Workflows: New Governance & Visibility Features from Snyk — snyk.io
  99. Foundations of trust: Securing the future of AI-generated code — snyk.io
  100. Top 5 SAST Auto-fixing Tools and How They Compare — snyk.io
  101. Securing GenAI Development with Snyk — snyk.io
  102. AI Trust in Action: How Snyk Agent Redefines Secure Development — snyk.io
  103. Why We Built Evo — From My Heart — snyk.io
  104. Old AI Security vs Evo: Watch Agentic Security Replace Weeks of Manual Work — snyk.io
  105. Claude Mythos Changed Everything. Your APIs Are the First Target. — securityboulevard.com
  106. NVIDIA/garak: the LLM vulnerability scanner — github.com
  107. LLM Red Teaming Guide (Open Source) - Promptfoo — promptfoo.dev
  108. OWASP Top 10 for LLMs 2025 | DeepTeam Red Teaming Framework — trydeepteam.com
  109. Training an AI agent to attack LLM applications like a real adversary — helpnetsecurity.com
  110. Introducing Wiz Agents & Workflows: Security at the Speed of AI — wiz.io
  111. A Framework for AI Threat Readiness — wiz.io
  112. https://github.com/Armur-Ai/Pentest-Swarm-AI — github.com
  113. KeygraphHQ/shannon: Fully autonomous AI hacker to find actual exploits in your web apps. Shannon has achieved a 96.15% success rate on the hint-free, source-aware XBOW Benchmark. — github.com
  114. harishsg993010/crossbow-agent: world's first Opensource fully Autonomous AI Security Engineer — github.com
  115. Wiz Code Week Recap: Securing AI Native Development — wiz.io
  116. Malicious npm Dependency Linked to AI Assisted Commit Targets Crypto Wallets — infosecurity-magazine.com
  117. Microsoft Security Copilot is a new GPT-4 AI assistant for cybersecurity — theverge.com
  118. The top 10 AI security articles you must read in 2024 — wiz.io
  119. North Korea macOS Malware Targets AI Analyst Tools: Gaslight Embeds 38 Fake Error Messages — techtimes.com
  120. 7 AI Security Testing Tools for LLMs Agents and AI Pipelines (2026) — ox.security
  121. Introducing Patch the Planet — blog.trailofbits.com
  122. OrcaRouter Releases AI Threat Report 2026 and Makes Its Security Controls Free Amid Rise in Prompt-Injection Attacks — aninews.in
  123. Wiz AI-SPM model scanning: Securely innovate with AI community models — wiz.io
  124. Pickle in the Middle – Hijacking Vertex AI Model Uploads for Cross-Tenant RCE — unit42.paloaltonetworks.com
  125. Hacking Moltbook: The AI Social Network Any Human Can Control — wiz.io
  126. Would You Click ‘Accept’? Automatically detecting malicious Azure OAuth applications using LLMs — wiz.io
  127. What an 'Aha' Moment with an Org Admin Token Taught One DevSecCon Speaker About AI Security — snyk.io
  128. Building an Agentic Cloud Security Ecosystem: A Reference Architecture with Wiz MCP and Infosys Cyber Next — wiz.io
  129. Live From Davos: The End of Human-Speed Security — snyk.io
  130. The Meta hack shows theres more to AI security than Mythos — technologyreview.com
  131. You Patched LiteLLM, But Do You Know Your AI Blast Radius? — snyk.io
  132. Securing CI/CD in an agentic world: Claude Code Github action case — microsoft.com
  133. What Is LLM (Large Language Model) Security? — paloaltonetworks.com
  134. Security for AI Agent Managers: Key Controls — blockchain-council.org
  135. Anthropic's model context protocol includes a critical remote code execution vulnerability — msn.com
  136. Claude Code Gemini CLI and GitHub Copilot Vulnerable to Prompt Injection via GitHub Comments — cybersecuritynews.com
  137. Anatomy of an Indirect Prompt Injection — pillar.security
  138. Practical LLM Security Advice from the NVIDIA AI Red Team — developer.nvidia.com
  139. skills/plugins/insecure-defaults/skills/insecure-defaults/SKILL.md at main · trailofbits/skills — github.com
  140. Beginners guide to AI in cybersec. Hacking with ChatGPT. — medium.com
  141. The AI Attack Surface Map v1.0 — danielmiessler.com
  142. How I Automate BugBounty Using Chatgpt — medium.com
  143. aress31/burpgpt — github.com
  144. SecGPT transforms cybersecurity through AI-driven insights. — medium.com
  145. I Used GPT-3 to Find 213 Security Vulnerabilities in a Single Codebase — medium.com
  146. Favorite tweet by @LeaKissner — twitter.com
📚 This guide is synthesized from the full text of resources curated in the AI library, and refreshed as new material is added.