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-08-01. Synthesized from 610 of 610 curated resources. Browse all 610 AI resources →

Problem Framing: The Shifting Threat Landscape

Application security professionals are accustomed to a predictable threat model: adversarial reconnaissance, vulnerability discovery, exploitation, and post-exploitation. However, the advent of generative AI, particularly Large Language Models (LLMs) and agentic AI, introduces a paradigm shift. These technologies are not just tools for attackers; they are becoming part of the attack surface itself. The speed, scale, and novelty of AI-driven attacks necessitate a re-evaluation of existing security controls and a proactive approach to understanding new vulnerabilities.

AI-driven attacks are compressing attack lifecycles from days to hours [1]. Attackers are leveraging AI to streamline reconnaissance, automate content generation for phishing campaigns, and discover complex vulnerabilities that traditional scanners might miss. The ability of AI models to analyze code, understand natural language, and chain together exploit primitives means that previously human-bound tasks are now susceptible to rapid automation [1][2][3]. For instance, AI has demonstrated proficiency in rediscovering known CVEs and even identifying novel cryptographic flaws [4][5]. This acceleration forces defenders to operate at machine speed, a significant departure from human-centric security operations.

Furthermore, the integration of AI into development workflows and operational technologies introduces new attack vectors. "Shadow AI" refers to the untracked or unsanctioned use of AI services, creating security blind spots [6]. Developers may inadvertently leak sensitive information by using unsecured AI tools or embedding API keys in code processed by AI assistants [7][8]. The very architecture of AI applications, with their reliance on external data, models, and interconnected tools, presents a novel and complex attack surface.

Core Mechanics: How AI Becomes the Attack Surface

At its core, many AI security concerns stem from how LLMs process and interpret input, especially when interacting with external data or executing commands. Understanding these mechanics is crucial for identifying and mitigating risks.

Prompt Injection

Prompt injection is arguably the most prevalent and difficult-to-patch vulnerability in LLM applications. It involves manipulating an LLM's input to achieve unintended actions, override system prompts, or exfiltrate data [9][10][11][12][13]. This can occur through direct injection, where malicious instructions are crafted into user prompts, or indirect prompt injection (IPI), where instructions are embedded in external content that the AI agent ingests, such as websites, documents, or emails [14][15][16][17][18].

Indirect prompt injection is particularly insidious because it can occur with zero user interaction, as demonstrated by the EchoLeak vulnerability against Microsoft 365 Copilot, which exfiltrated data via embedded instructions in emails [14][17]. Attackers can also poison the AI's conversational memory or leverage tool outputs to inject malicious commands [19]. The OWASP Top 10 for LLM Applications consistently highlights prompt injection as a primary risk [20][21][22].

Model Context Protocol (MCP) and Agentic Workflows

The Model Context Protocol (MCP) standardizes communication between AI agents and external tools, APIs, and environments [23][24][25][26][27][28]. While enabling powerful agentic workflows, MCP also introduces significant vulnerabilities. A systemic flaw in Anthropic's MCP implementation allowed Arbitrary Command Execution (RCE) on over 150 million servers, impacting numerous popular AI frameworks like LiteLLM, LangChain, and IBM's LangFlow [27][29]. Exploitation vectors include UI injection, bypasses of hardening measures, zero-click prompt injection, and malicious distribution through marketplaces [27].

AI agents operating with excessive agency or privileges, especially when connected to live systems via MCP, create a potent attack surface. The "lethal trifecta" of private data, untrusted content, and external communication is amplified by agentic AI, enabling sophisticated data exfiltration and unauthorized actions [10][30]. The s1ngularity supply chain attack leveraged AI coding agents via dangerous prompts to exfiltrate secrets, demonstrating how compromised dependencies can weaponize AI workflows [31].

Supply Chain Risks

The AI supply chain is complex, encompassing training data, models, libraries, dependencies, and the infrastructure that hosts them. Attacks targeting this chain can compromise AI integrity and security. This includes:

Vulnerable AI-Generated Code

AI coding assistants like GitHub Copilot and Google Gemini Code Assist can generate code with security flaws [42][43]. Studies indicate a significant percentage of AI-generated code snippets contain common weaknesses (CWEs), with some findings showing up to 40% insecure code [44][45][46]. These vulnerabilities can include insecure coding practices, improper input handling, and logic flaws, often shipped without adequate manual review [42][47][34][48].

Notable Techniques and Attack Vectors

Beyond the core mechanics, specific techniques and observed attacks highlight the diverse nature of AI-driven threats.

Prompt Injection Variants

Agentic AI Exploitation

Supply Chain Attacks

Data Exfiltration and Exposure

Code Execution and Infrastructure Compromise

Detection and Prevention Strategies

Defending against AI-driven attacks requires a multi-layered approach that moves beyond traditional security controls.

Input Validation and Sanitization

Strict validation and sanitization of all inputs, especially those processed by LLMs and passed to external tools, are paramount. This includes filtering prompt content, validating tool descriptions, and ensuring that data ingested from external sources is not maliciously crafted [18][13][86][51]. Contextual Integrity (CI) theory suggests focusing on how information flows through an AI system, rather than solely on its content [87].

Principle of Least Privilege and Agent Governance

AI agents, particularly those connected to production systems via MCP, must operate under the principle of least privilege. Granting them only the necessary permissions and tools is critical to limiting the blast radius of a compromise [61][63][88]. Agentic Development Security (ADS) focuses on governing what agents use, do, and generate, moving security closer to decision-making within AI-driven development [64].

Behavioral Integrity Verification (BIV)

For AI agent skills, verifying that their declared behavior matches their actual execution is crucial. Deviations can indicate tampering or malicious intent [89]. This involves continuously auditing agent actions against their expected functionality.

Supply Chain Security for AI Assets

Given the reliance on external models, libraries, and tools, securing the AI supply chain is non-negotiable. This includes:

Runtime Guards and Monitoring

Runtime controls are vital for detecting and preventing attacks in progress. This includes:

Prompt Security and Content Moderation

While prompt injection may be an inherent flaw [10][87][13][30], layered defenses can mitigate its impact. This involves prompt hardening, content filtering, and redirecting potentially malicious inputs or outputs. Microsoft's Prompt Shields and systems like Lakera Guard are examples of such defenses [102][86]. Techniques like "context bombing" aim to trigger AI refusal mechanisms to shut down malicious agents [103].

Securing AI-Generated Code

Treat AI-generated code with the same scrutiny as human-written code. Integrate SAST and SCA tools into CI/CD pipelines to scan for vulnerabilities and license compliance [42][48][96][97]. Developers should be trained to critically review AI-generated code and understand common AI-introduced vulnerabilities [42][43].

Security Posture Management for AI

Organizations need dedicated AI Security Posture Management (AI-SPM) solutions to inventory AI assets, identify misconfigurations, assess risks across the AI lifecycle, and provide continuous defense [6][90][97][104]. The Wiz AI-SPM platform, for example, builds an AI inventory, analyzes risks across layers, and offers runtime threat detection [104].

Tooling for AI Security

A growing ecosystem of tools is emerging to address the unique challenges of AI security:

AI Security Posture Management (AI-SPM)

Vulnerability Scanning and Testing

Agent Governance and Orchestration

Developer Integration and Workflow

Recent Developments and Future Trends

The AI security landscape is evolving rapidly. Key trends and recent developments include:

Acceleration of Vulnerability Discovery and Exploitation

AI models are becoming increasingly adept at finding zero-day vulnerabilities and even autonomously exploiting them [66][67][68]. This capability is leading to a spike in CVEs and compressing the time from discovery to exploitation.

Sophistication of Prompt Injection Techniques

Prompt injection is not a static threat. New variants like indirect prompt injection, tool poisoning, conversation history manipulation, and multimodal injections are constantly emerging, making detection and prevention increasingly challenging [115][52][17][19][51][58]. The realization that prompt injection may be a permanent flaw, not a patchable bug, is shifting defense strategies [10][87][30].

The Rise of Agentic AI Security Orchestration

Tools like Evo by Snyk are ushering in an era of agentic security orchestration, where AI agents autonomously perform tasks like discovery, risk assessment, and remediation [112][105]. This promises to accelerate security operations but also introduces new complexities in managing agent behavior and ensuring their integrity.

Supply Chain Attacks Targeting AI Infrastructure

The AI supply chain, from models and libraries to vector databases and MCP servers, is a significant target. Attacks like the s1ngularity incident on Nx packages and the widespread MCP vulnerabilities highlight the critical need for end-to-end supply chain security [41][27].

AI-Driven Offensive Security Tools

The development of AI-powered penetration testing tools and autonomous AI hackers is a significant trend. Tools like Wiz Red Agent, Crossbow Agent, and Shannon are capable of finding complex, logic-driven vulnerabilities that traditional tools might miss [84][65][116]. This necessitates a stronger focus on adversarial simulation and red teaming.

Focus on Model Governance and Risk Assessment

As AI becomes more embedded, robust governance frameworks, AI Risk Management Frameworks (like NIST AI RMF), and comprehensive risk assessments are becoming essential to ensure responsible development and deployment [112][22].

Where to Go Deeper

For those seeking to deepen their understanding and practical skills in AI security, several resources and areas of focus are recommended:

Community and Frameworks

Hands-on Practice and Learning

Key Research Areas

Sources cited in this guide

  1. AI-powered breaches provide wake-up call for incident response — csoonline.com
  2. What Is AI Pentesting and How Does It Works? — snyk.io
  3. Chinese-Speaking Threat Actor Harnesses AI Models for Autonomous Cyberattacks — unit42.paloaltonetworks.com
  4. Claude Mythos degrades HAWK and developed new exploit for round-reduced AES — anthropic.com
  5. [tl;dr sec] #339 - Hugging Face's Incident Report, Context Bombs, AI does Cryptanalysis — tldrsec.com
  6. AI Security 101: Mapping the AI Attack Surface — wiz.io
  7. Exposure Report: 65% of Leading AI Companies Found with Verified Secret Leaks — wiz.io
  8. How AI is powering business email compromise at scale — research.eye.security
  9. OrcaRouter Releases AI Threat Report 2026 and Makes Its Security Controls Free Amid Rise in Prompt-Injection Attacks — voiceofasean.com
  10. AI Agent Security Hits Its Reckoning: Prompt Injection May Be a Permanent Flaw Not a Patchable Bug — techtimes.com
  11. Indirect prompt injection is taking hold in the wild — helpnetsecurity.com
  12. How indirect prompt injection attacks on AI work - and 6 ways to shut them down — zdnet.com
  13. OWASP LLM Prompt Injection Prevention Cheat Sheet — cheatsheetseries.owasp.org
  14. OrcaRouter Releases AI Threat Report 2026 and Makes Its Security Controls Free Amid Rise in Prompt-Injection Attacks — aninews.in
  15. Detecting AI-specific threats in Claude Enterprise from the Compliance API: a prefilter + LLM-as-judge pipeline with Sigma rules — papermtn.co.uk
  16. Indirect Prompt Injection Exposes a Universal AI Security Flaw No Deployment Model Is Immune — futurumgroup.com
  17. EchoLeak: First Real-World Zero-Click Prompt Injection Exploit — arxiv.org
  18. Q4 2025 AI Agent Security Trends — lakera.ai
  19. Agentic AI Security in Production: MCP, Memory Poisoning, Tool Misuse — penligent.ai
  20. OWASP Top 10 for LLMs 2025: Key Risks and Mitigation Strategies — invicti.com
  21. OWASP Top 10 for LLM Applications 2025 — genai.owasp.org
  22. OWASP Top 10 for LLMs 2025 | DeepTeam Red Teaming Framework — trydeepteam.com
  23. The New Threat Landscape: AI-Native Apps and Agentic Workflows — snyk.io
  24. Secure at Inception: Introducing New Tools for Securing AI-Native Development — snyk.io
  25. Meeting the AI Mandates with Confidence: Why Federal Teams Trust Snyk — snyk.io
  26. Agentic Container Security with Snyk MCP Server — snyk.io
  27. The Mother of All AI Supply Chains: Critical Systemic Vulnerability at the Core of Anthropics MCP — ox.security
  28. A Timeline of Model Context Protocol (MCP) Security Breaches — authzed.com
  29. MCP Supply Chain Advisory: RCE Vulnerabilities Across the AI Ecosystem — ox.security
  30. You cant patch your way out of prompt injection: AI agents need a different defense — hackread.com
  31. Weaponizing AI Coding Agents for Malware in the Nx Malicious Package Security Incident — snyk.io
  32. Generative AI Security: Risks & Best Practices — wiz.io
  33. Phantom Squatting: AI-Hallucinated Domains as a Software Supply Chain Vector — unit42.paloaltonetworks.com
  34. How SAS secures their AI-generated code — snyk.io
  35. Malicious npm Dependency Linked to AI Assisted Commit Targets Crypto Wallets — infosecurity-magazine.com
  36. 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
  37. The risk in malicious AI models: Wiz Research discovers critical vulnerability in AI-as-a-Service provider, Replicate — wiz.io
  38. Wiz AI-SPM model scanning: Securely innovate with AI community models — wiz.io
  39. SAPwned: SAP AI vulnerabilities expose customers’ cloud environments and private AI artifacts — wiz.io
  40. Ultralytics AI Pwn Request Supply Chain Attack — snyk.io
  41. s1ngularity's Aftermath: AI, TTPs, and Impact in the Nx Supply Chain Attack — wiz.io
  42. Why You Need a Security Companion for AI-Generated Code — snyk.io
  43. Build Fast, Stay Secure: Guardrails for AI Coding Assistants — snyk.io
  44. Secure AI-Generated Code at Speed with Snyk and ServiceNow — snyk.io
  45. Welcome-to-The New Era of AI-Driven Development — snyk.io
  46. AI Coding Security Vulnerability Statistics 2026: Alarming Data — sqmagazine.co.uk
  47. 4 Advantages of using AI code review — snyk.io
  48. An investigation into code injection vulnerabilities caused by generative AI — snyk.io
  49. LiteLLM exploited within 36 hours of disclosure via SQL injection bug — scworld.com
  50. What Is Prompt Injection in AI? Examples & Prevention | EC-Council — eccouncil.org
  51. Three Prompt Injection Patterns Your AI Security Detection Stack Misses — cybersecurity-insiders.com
  52. MCP Security: Tool Poisoning Attacks - Invariant Labs — invariantlabs.ai
  53. How Agentic Tool Chain Attacks Threaten AI Agent Security — crowdstrike.com
  54. Poison Everywhere: No Output from Your MCP Server Is Safe - CyberArk — cyberark.com
  55. AI agents on GitHub leak API keys via prompt injection — techzine.eu
  56. Agents hooked into GitHub can steal creds but Anthropic Google and Microsoft haven't warned users — theregister.com
  57. Single Line of Code Can Jailbreak 11 AI Models Including ChatGPT, Claude, Gemini — cyberpress.org
  58. 8,000+ MCP Servers Exposed: The Agentic AI Security Crisis of 2026 — cikce.medium.com
  59. EchoGram: Bypassing AI Guardrails via Token Flip Attacks - HiddenLayer — hiddenlayer.com
  60. AI Agents in Cybersecurity: Revolutionizing AppSec — snyk.io
  61. ServiceNow's Virtual Agent Vulnerability Shows Why AI Security Needs Traditional AppSec Foundations — snyk.io
  62. Hunting Account Takeovers in the Wild West of MCP OAuth Servers" — blog.sicks3c.io
  63. The New Security Control Point: Governing AI Agents Inside the Execution Loop — snyk.io
  64. Announcing Agentic Development Security (ADS) — snyk.io
  65. harishsg993010/crossbow-agent: world's first Opensource fully Autonomous AI Security Engineer — github.com
  66. Claude Mythos: Preparing for a World Where AI Finds and Exploits Vulnerabilities Faster Than Ever — wiz.io
  67. Claude Mythos Changed Everything. Your APIs Are the First Target. — securityboulevard.com
  68. When LLMs Autonomously Attack - CMU Research — engineering.cmu.edu
  69. Snyk Finds Prompt Injection in 36%, 1467 Malicious Payloads in a ToxicSkills Study of Agent Skills Supply Chain Compromise — snyk.io
  70. How a Malicious Google Skill on ClawHub Tricks Users Into Installing Malware — snyk.io
  71. The sorry state of skill distribution — blog.trailofbits.com
  72. The AI Attack Surface Map v1.0 — danielmiessler.com
  73. The Dark Side of LLMs: Agent-based Attacks for Complete Computer Takeover — arxiv.org
  74. Practical Poisoning Attacks against Retrieval-Augmented Generation — arxiv.org
  75. OWASP GenAI Top 10 Risks and Mitigations for Agentic AI Security — genai.owasp.org
  76. The Vulnerable MCP Project: Comprehensive MCP Security Database — vulnerablemcp.info
  77. depthfirst | 1-Click RCE To Steal Your Moltbot Data and Keys — depthfirst.com
  78. Wiz Research Finds Critical NVIDIA AI Vulnerability Affecting Containers Using NVIDIA GPUs, Including Over 35% of Cloud Environments — wiz.io
  79. NVIDIAScape - Critical NVIDIA AI Vulnerability: A Three-Line Container Escape in NVIDIA Container Toolkit (CVE-2025-23266) — wiz.io
  80. Probllama: Ollama Remote Code Execution Vulnerability (CVE-2024-37032) – Overview and Mitigations — wiz.io
  81. LangChain LangGraph Flaws Expose Files Secrets Databases in Widely Used AI Frameworks — thehackernews.com
  82. Pickle in the Middle – Hijacking Vertex AI Model Uploads for Cross-Tenant RCE — unit42.paloaltonetworks.com
  83. skills/plugins/insecure-defaults/skills/insecure-defaults/SKILL.md at main · trailofbits/skills — github.com
  84. Introducing the Red Agent POV Series — wiz.io
  85. Microsoft Copilot: From Prompt Injection to Exfiltration of Personal Information · Embrace The Red — embracethered.com
  86. Guardrails for AI Agents: Safety and Security — blockchain-council.org
  87. AI Agents May Always Fall for Prompt Injections — arxiv.org
  88. What nearly 10,000 developer environments reveal about agentic development risk — snyk.io
  89. Trust No Skill: Integrity Verification for AI Agent Supply Chains — unit42.paloaltonetworks.com
  90. Securing AI Agents with Wiz AI-SPM — wiz.io
  91. Welcome to Snyk Labs: Charting the Course for AI-Native Security — snyk.io
  92. Evo Adds CycloneDX Support to Give Full AI Visibility — snyk.io
  93. How JFrog and NanoClaw are Bringing Software Supply Chain Security to the Age of Autonomous AI — jfrog.com
  94. Stop Treating Coding Agent Plugins Like Settings: Introducing Agent Plugins Repositories — jfrog.com
  95. AI Risk Management: Benefits, Challenges, and Best Practices — snyk.io
  96. Snyk Security Solution Now Integrated into Google Cloud's Gemini Code Assist — snyk.io
  97. Introducing the Snyk AI Security Platform — snyk.io
  98. Agentic Browser Security: 2025 Year-End Review — wiz.io
  99. The AI Agent Security Surface: What Gets Exposed When You Add Tools and Memory — towardsdatascience.com
  100. Empower and Accelerate Your SOC with the Blue Agent — wiz.io
  101. AI Threat Readiness Pillar 3: Perform AI Code Analysis Natively in Wiz — wiz.io
  102. Protecting Against Indirect Prompt Injection Attacks in MCP — developer.microsoft.com
  103. Now defenders are embracing the prompt injection too — arstechnica.com
  104. Introducing Wiz AI Application Protection Platform (AI-APP) — wiz.io
  105. Old AI Security vs Evo: Watch Agentic Security Replace Weeks of Manual Work — snyk.io
  106. NVIDIA/garak: the LLM vulnerability scanner — github.com
  107. Show HN: Claw Patrol, a security firewall for agents — github.com
  108. LLM Red Teaming Guide (Open Source) - Promptfoo — promptfoo.dev
  109. Aikido and OWASP bring agentic Code Audit to the global AppSec community — owasp.org
  110. MCP Safety Audit: LLMs with MCP Allow Major Security Exploits — arxiv.org
  111. New Prompt Injection Attack Vectors Through MCP Sampling — unit42.paloaltonetworks.com
  112. Why We Built Evo — From My Heart — snyk.io
  113. Building AI Trust with Snyk Code and Snyk Agent Fix — snyk.io
  114. Securing the uncharted territories of AI systems. A discussion with Leo Racanelli — intigriti.com
  115. Prompt Injection Attack Against LLM-Integrated Applications — arXiv — arxiv.org
  116. 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
  117. How AI Red Teaming Fixes Vulnerabilities in Your AI Systems — invisibletech.ai
  118. Red Teaming the Mind of the Machine: Evaluation of Prompt Injection and Jailbreak Vulnerabilities — arxiv.org
  119. Practical LLM Security Advice from the NVIDIA AI Red Team — developer.nvidia.com
📚 This guide is synthesized from the full text of resources curated in the AI library, and refreshed as new material is added.