LLM Security
LLM Security vulnerabilities at a glance
Overview
The rise of LLM usage has created a new class of vulnerabilities for applications that integrate artificial intelligence and large language models. These vulnerabilities tend to exploit the probabilistic nature of AI systems and their ability to interpret and generate natural language.
Examples include:
- Prompt injection attacks that manipulate LLMs to ignore safety guidelines and perform unintended actions.
- Data exfiltration exploits that can extract sensitive information from training data or user prompts.
- Training data poisoning which compromises model behavior at development time.
Where it occurs
AI and LLM vulnerabilities arise from treating user input and system prompts equivalently without separation. This can lead to LLMs execuiting arbitrary tool calls without validation, insufficient output filtering that allows sensitive data leakage and many other risks.
Impact
AI and LLM security failures can lead to unauthorized data access through prompt injection, extraction of sensitive training data or user information, remote code execution through insecure tool integrations, and many other risks.
Prevention
Different vulnerabilities will require different prevention approaches, but in general all systems should look to sanitise user inputs and create clear separations between inputs and system prompts.
Specific Vulnerabilities
Explore specific vulnerability types within this category:
Detect These Vulnerabilities in Your Code
Sourcery automatically identifies llm security and related vulnerabilities in your codebase.
Scan Your Code for Free