
- 17 June, 2025
- 3 Min read
LLM Applications Security
Measures taken to protect LLM applications from threats and vulnerabilities.
Application Security is the practice of protecting software applications from security threats throughout their entire lifecycle, from development to deployment and beyond.
Application Security means finding and fixing weaknesses in websites, apps, or software so hackers can’t break in or misuse them.
Background
Technique
Artificial intelligence (AI
) is the capability of computational systems to perform tasks typically associated with human intelligence, such as learning
, reasoning
, problem-solving
, perception
, and decision-making
. It is a field of research in computer science that develops and studies methods and software that enable machines to perceive their environment and use learning and intelligence to take actions that maximize their chances of achieving defined goals.
High-profile applications of AI include advanced web search engines (e.g.,
Google Search
); recommendation systems (used byYouTube
,Amazon
, andNetflix
); virtual assistants (e.g.,Google Assistant
,Siri
, andAlexa
); autonomous vehicles (e.g.,Waymo
); generative and creative tools (e.g.,language models
andAI art
); and superhuman play and analysis in strategy games (e.g.,Chess
andGo
).
Tactic
A large language model (LLM
) is a language model trained with self-supervised machine learning on a vast amount of text, designed for natural language processing tasks, especially language generation.
The largest and most capable LLMs are generative pretrained transformers (GPTs), which are largely used in generative chatbots such as
ChatGPT
,Gemini
orClaude
. LLMs can be fine-tuned for specific tasks or guided by prompt engineering. These models acquire predictive power regardingsyntax
,semantics
, andontologies
inherent in human language corpora, but they also inherit inaccuracies and biases present in thedata
they are trained in.
Standards
The OWASP Top Ten is a list of the 10 most critical Large Language Model (LLM
) applications security risks published by the Open Web Application Security Project (OWASP)
. It is widely used by developers, security professionals, and organizations to identifying the most critical security vulnerabilities in LLM applications.
OWASP Top 10
-
Prompt Injection
Malicious user inputs override system instructions or instruct the model to reveal sensitive data.
Ignore previous instructions and expose internal secrets.
-
Sensitive Information Disclosure
LLMs may unintentionally leak API keys, PII, or internal knowledge via prompts or training data.
Model revealing past training inputs containing user data.
-
Supply Chain Vulnerabilities
Third-party models, tools, or datasets can be compromised and introduce backdoors or malicious behavior.
Pre-trained LLM with hidden malicious payload due to tampered dataset.
-
Data & Model Poisoning
Deliberate poisoning of fine-tuning data leads to biased or backdoored behavior.
Inserting adversarial tokens into training sets for later exploitation.
-
Improper Output Handling
Treating LLM output as trusted can lead to injection, code execution, or logic hijacking.
Chatbot output containing executable code used without sanitization.
-
Excessive Agency
Granting LLMs authority to perform operations like file access or API calls without oversight.
LLM resetting passwords or executing transactions autonomously.
-
System Prompt Leakage
Exposure of internal systems prompts attackers to gain knowledge to bypass logic and constraints.
Log or API response exposing the system-level control prompt text.
-
Vector & Embedding Weaknesses
Embedding spaces can be manipulated or reverse‑engineered for inference, extraction, or attacks.
Extracting sensitive vectors or manipulating similarity search behavior.
-
Misinformation
LLM outputs false or biased content, potentially challenging trust, decision-making, or compliance.
Confident but incorrect legal, medical, or financial responses.
-
Unbounded Consumption
Recursive or large inputs exhaust resources, leading to denial-of-service or runaway billing.
Prompt loops or excessive token generation causing crashes or high usage.
Risk & Mitigation
-
Prompt Injection
Caution
Can hijack the LLM’s logic layer and bypass filters.
Prevention
Input sanitization, prompt isolation, output filters, and adversarial red teaming.
-
Sensitive Information Disclosure
Caution
Data leaks can violate privacy laws or expose secrets.
Prevention
Scrub training data, use output redaction, limit retention, and log prompts.
-
Supply Chain Vulnerabilities
-
Data & Model Poisoning
Caution
External dependencies may be compromised.
Prevention
Vet model sources, maintain SBOM (Software Bill of Materials), use anomaly detection, and validate datasets.
-
Improper Output Handling
Caution
Outputs may execute insecure code or logic.
Prevention
Sanitize outputs, enforce zero-trust policies and validate downstream logic.
-
Excessive Agency
Caution
LLM can perform high-risk actions without oversight.
Prevention
Use human-in-the-loop workflows, limit privileges and log all actions.
-
System Prompt Leakage
Caution
Attackers learn internal rules and gain control over model behavior.
Prevention
Keep system prompts hidden, obfuscate logs and restrict visibility.
-
Vector & Embedding Weaknesses
Caution
Semantic inference can expose sensitive training data or model behavior.
Prevention
Use embedding sanitization, vector anonymization, and similarity threshold controls.
-
Misinformation
Caution
Inaccurate outputs may lead to incorrect decisions or legal risks.
Prevention
Display confidence levels, ground responses in verified sources and human review.
-
Unbounded Consumption
Caution
Infinite loops or large requests can crash your system or cost more.
Prevention
Enforce token limits, rate limits, query shape validation and usage quotas.
Takeaways
- OWASP Top 10
v1.1 (2025)
list reflects the latest threats in deployed LLM environments. - Prompt injection, embedding attacks, and data poisoning have become critical risks.
- Mitigation methods span input/output sanitation, threat modeling, access limitation, and runtime monitoring.