Today, large language models can access internal documents, customer records, generate code, call APIs, and perform tasks through autonomous AI agents. Retrieval-augmented generation (RAG) lets organizations connect AI systems to private data for more relevant outputs.
Retrieval-augmented generation, or RAG, allows an AI application to reference an organization's private documents and business data when generating a response. The system converts documents into vector embeddings, retrieves relevant content for a query, and adds it to the model's context. Permission checks must be applied during retrieval to prevent users from accessing content outside their role.
While these capabilities increase functionality, they also expand the attack surface. AI applications may pass standard penetration tests yet remain vulnerable to prompt injection, jailbreaks, data leakage, unsafe tool execution, or cross-tenant exposure.
Direct prompt injection occurs when a user enters malicious instructions into the AI interface. Indirect prompt injection occurs when malicious instructions are hidden inside a document, email, website, or other source the application later retrieves.
This is exactly why organizations need AI & LLM Application Security Assessments, which evaluate how AI responds when attackers manipulate prompts, system instructions, retrieved content, connected tools, or agent workflows. Combined with LLM red teaming, these assessments uncover real-world weaknesses before attackers exploit them, producing a documented, reproducible assessment of the AI application's exploitable weaknesses.
What Are AI & LLM Application Security Assessments?
AI & LLM Application Security Assessments are structured evaluations of risks across the entire AI application stack. Instead of focusing only on the model, they examine how prompts, APIs, RAG pipelines, vector databases, agents, tools, authentication systems, and data sources interact.
This broader view is critical for AI and data security because the model itself is rarely the weakest link. An AI assistant may behave safely in isolation, but risks increase once it can retrieve confidential data, update records, send emails, or execute actions.
A strong LLM Application Security Assessment evaluates whether attackers can override instructions, extract sensitive prompts, access unauthorized data, bypass controls, misuse tools, escalate privileges, or manipulate workflows. The goal is not just to observe unusual outputs, but to determine whether those outputs can lead to real security, privacy, or operational impact.
Why Traditional Security Testing Is Not Enough
Traditional security testing focuses on issues like broken access control, insecure APIs, SQL injection, and infrastructure flaws. These risks still matter, but they do not fully address how AI systems behave.
Large language models are context-driven and probabilistic. A request that is blocked in one scenario may succeed when reworded, split across multiple messages, encoded, translated, or embedded within retrieved content.
Because of this, AI Application Security requires testing beyond code and infrastructure. Security teams must evaluate prompts, model behavior, data retrieval, tool permissions, and how outputs are processed. This dynamic nature makes AI security fundamentally different from traditional application security.
What Is LLM Red Teaming?
LLM red teaming is an adversarial testing process in which security specialists deliberately attempt to bypass an AI application’s safeguards. Instead of checking whether security controls exist, the red team actively tries to defeat them.
An LLM red teaming engagement may simulate an external attacker, a malicious customer, a compromised employee, a user from another tenant, a poisoned document, a compromised plugin, or an attacker with partial architectural knowledge.
The goal is to identify realistic attack paths that could expose sensitive data, manipulate model behavior, trigger unsafe actions, or misuse legitimate capabilities.
Because attacks are adapted turn-by-turn based on the application's responses, this approach surfaces attack paths that a static jailbreak prompt list does not.
AI Security Assessments vs. LLM Red Teaming
Although closely related, AI security assessments and LLM red teaming serve different purposes.
Area | AI Security Assessments | LLM Red Teaming |
Main objective | Identify security weaknesses | Actively exploit weaknesses |
Approach | Architecture and control review | Adversarial attack simulation |
Coverage | Model, data, tools and infrastructure | Prompts, behavior and attack paths |
Output | Findings and recommendations | Proof-of-concept attacks |
Best use | Security assurance | Exploit validation |
The strongest AI & LLM Application Security Assessments combine both approaches.
The assessment identifies where weaknesses may exist, while red teaming demonstrates how those weaknesses could be exploited.
Key Areas Covered During AI Security Testing
1. Prompt Injection Testing
Prompt injection occurs when an attacker provides instructions that alter the behavior of an AI application.
A successful attack may cause the model to ignore its original instructions, reveal protected information, invoke a restricted tool, or perform an unintended action.
Direct prompt injection is submitted through the normal user interface.
Attackers may attempt to override system instructions, change the model’s role, reveal hidden prompts, access protected information, trigger unauthorized functions, or generate restricted content.
Simple filters may block obvious commands, but more sophisticated attacks use obfuscation, multiple turns, fake system messages, or alternative languages.
Indirect Prompt Injection
Indirect prompt injection is hidden inside content the AI application retrieves or processes.
Malicious instructions may be placed in web pages, PDFs, emails, uploaded files, support tickets, database records, or knowledge base articles.
When the application reads this content, it may treat the malicious text as a trusted instruction.
An LLM Application Security Assessment should test both direct and indirect prompt injection because indirect attacks can affect users who never interact with the attacker directly.
Prompt Leakage and System Prompt Extraction
System prompts may contain internal instructions, business logic, tool descriptions, or security rules.
Attackers may try to extract them through translation requests, debugging scenarios, token manipulation, or multi-turn conversations.
Prompt leakage can provide valuable information for planning further attacks.
2. Jailbreak Resistance Evaluation
Jailbreak attacks are designed to bypass model safety controls.
A proper jailbreak resistance evaluation should include techniques such as role-play exploits, encoding-based bypasses, multi-turn escalation, adversarial suffix attacks, multilingual jailbreaks, context manipulation, token splitting, and instruction obfuscation.
Because model behavior can vary, attacks should be repeated across different contexts and conversation histories.
A model that blocks an attack once should not automatically be considered secure.
3. RAG Data Leakage Assessment
RAG applications retrieve information from external data sources and place it into the model’s context.
This improves accuracy, but it can also expose confidential information when retrieval controls are weak.
A RAG data leakage assessment may test for:
Unauthorized Data Retrieval
The application may retrieve documents that the current user is not permitted to access.
This can happen when user permissions are not correctly applied to vector searches or metadata filters.
Cross-Tenant Data Leakage
In multi-tenant systems, information belonging to one customer may be exposed to another.
Testing should confirm that tenant separation is enforced across data ingestion, vector storage, retrieval, caching, and conversation history.
Attackers may insert malicious instructions into documents later retrieved by the AI application.
Once included in the context window, this content may influence the response or trigger an unsafe action.
Embedding and Vector Weaknesses
Vector databases can introduce risks related to weak isolation, insecure metadata, embedding inversion, and overly broad similarity searches.
Effective LLM security assessments evaluate the entire RAG pipeline rather than testing only the chatbot interface.
4. AI Agent Red Teaming
AI agents can take actions, not just generate responses.
Depending on their permissions, agents may send emails, query databases, update CRM records, create cloud resources, modify files, or execute code.
This makes AI agent red teaming an essential part of modern AI Application Security.
Testers attempt to make an agent use a legitimate tool for an unauthorized purpose, such as sending sensitive data externally, accessing another user’s records, querying restricted systems, triggering administrative functions, or creating unauthorized transactions.
Privilege Escalation Through Function Calling
An agent may have access to tools with greater privileges than the user.
If the application relies only on the model to determine whether an action is permitted, an attacker may manipulate the agent into performing actions the user could not execute directly.
Individual actions may appear harmless but become dangerous when combined.
For example, an agent could retrieve a confidential document, summarize the information, create an external email, and send the content without approval.
AI agent red teaming tests these complete workflows and determines whether tool permissions are limited, user authorization is independently validated, high-risk actions require approval, inputs and outputs are checked, actions are logged, and transactions can be reversed.
5. Model Abuse and Misuse Testing
Not every AI security risk depends on a technical vulnerability.
Authorized users may intentionally misuse a model for activities that violate business, legal, or security requirements.
Testing may cover harmful content generation, fraud or phishing assistance, personal information extraction, intellectual property leakage, unsafe code generation, policy circumvention, unauthorized profiling, and high-volume automated abuse.
Testing determines whether confidential information can be extracted from prompts, training data, retrieved documents, logs, cached responses, or conversation memory.
Model output should always be treated as untrusted.
When generated output is passed directly into another application, it may create risks such as command injection, unsafe API requests, code execution, or cross-site scripting.
For this reason, AI Model Security includes both model behavior and the way the surrounding application processes its output.
AI Model Deployment Security Best Practices
AI Model Security is not complete once testing ends. Deployment choices can introduce new risks even when the model itself has been assessed.
Organizations should follow several core best practices.
Enforce Strong Access Controls
Models, APIs, vector databases, administrative consoles, and connected tools should follow least-privilege access.
Authorization should always be enforced at the application and infrastructure level, not only through system prompts.
Protect Model APIs
Model endpoints should use strong authentication, rate limiting, request validation, secure secret storage, monitoring, and network restrictions where appropriate.
API keys and credentials should never be stored inside prompts or client-side code.
User prompts, uploaded documents, retrieved data, and external content should be treated as untrusted.
Generated output should also be validated before it is passed into databases, APIs, command-line tools, or automated workflows.
Limit Agent Permissions
AI agents should receive only the tool access they need.
High-risk actions, such as deleting records, changing security settings, transferring funds, or sending confidential data, should require human approval.
Secure RAG Deployments
RAG systems should use document-level access controls, tenant isolation, source validation, encrypted storage, restricted vector database access, and careful control over how much context is retrieved.
Monitor AI Activity
Organizations should monitor jailbreak attempts, suspicious retrieval activity, unusual tool calls, abnormal token consumption, and repeated attempts to access protected information.
Retest After Major Changes
Changes to models, prompts, data sources, tools, agent workflows, or guardrails can introduce new vulnerabilities.
Regular AI Security Testing, LLM red teaming, and AI agent red teaming should be part of the deployment lifecycle.
Framework Alignment for AI Security Assessments
A structured AI Security Testing methodology should align findings with recognized frameworks.
OWASP Top 10 for LLM Applications
Relevant coverage may include:
- LLM01: Prompt Injection
- LLM02: Insecure Output Handling
- LLM03: Training Data Poisoning
- LLM06: Sensitive Information Disclosure
- LLM07: Insecure Plugin Design
- LLM08: Excessive Agency
OWASP alignment helps categorize common weaknesses across models, connected tools, outputs, and application workflows.
MITRE ATLAS
MITRE ATLAS provides adversarial tactics and techniques covering:
- Reconnaissance
- Initial access
- ML model access
- Collection
- Exfiltration
- Impact
A MITRE ATLAS attack map shows how individual vulnerabilities can combine into a wider attack path.
NIST AI 100-2
NIST AI 100-2 provides a taxonomy for adversarial machine learning risks, including:
- Evasion attacks
- Poisoning attacks
- Privacy attacks
- Abuse and misuse attacks
It supports consistent classification and risk scoring across AI security assessments.
How AI & LLM Application Security Assessments Are Conducted
1. Architecture Review
The assessment identifies models, prompts, APIs, RAG components, data sources, tools, users, permissions, and trust boundaries.
2. Threat Modeling
Security teams define likely attackers, valuable assets, attack paths, and potential business impact.
3. Automated AI Security Testing
Tools such as Garak, PyRIT, Lakera Red, and custom payload libraries provide coverage across known attack techniques.
4. Manual LLM Red Teaming
Human testers, often working alongside LLM Engineers who understand the underlying model behavior, adapt attacks based on the application's responses, business logic, permissions, and workflows.
5. Exploitation and Impact Validation
Potential weaknesses are tested to determine whether they can expose data, bypass authorization, invoke tools, or create operational impact.
Findings are prioritized based on exploitability, repeatability, data sensitivity, agent permissions, and business impact.
7. Retesting
After remediation, testing confirms whether the controls block multiple variations of the original attack.
Folio3 AI & LLM Application Security Assessments and Red Teaming
Folio3 helps organizations identify vulnerabilities in AI-powered applications before attackers do.
Folio3's AI & LLM Application Security Assessments and Red Teaming services simulate realistic attacks against:
- LLM applications
- AI agents
- RAG architectures
- Model integrations
- APIs
- Plugins
- Business workflows
- Multi-user AI platforms
The assessment focuses on whether an attacker can access protected information, bypass business rules, manipulate model behavior, misuse connected tools, or trigger unauthorized actions.
Folio3 Assessment Scope
Testing covers:
- Direct prompt injection
- Indirect prompt injection
- Cross-plugin injection
- Prompt leakage
- System prompt extraction
- Encoded and multilingual attacks
Jailbreak Resistance Evaluation
Testing includes:
- Role-play exploits
- Encoding-based bypasses
- Multi-turn escalation
- Adversarial suffix attacks
- Safety policy circumvention
RAG Data Leakage Assessment
Testing covers:
- Unauthorized data retrieval
- Context window poisoning
- Embedding inversion
- Cross-tenant data leakage
- Weak retrieval authorization
- Excessive context exposure
Folio3's AI agent red teaming evaluates:
- Unauthorized tool invocation
- Function-calling privilege escalation
- Excessive agency
- Unsafe action execution
- Tool-chain abuse
- Missing approval controls
Model Abuse and Misuse Testing
Testing covers:
- Harmful content generation
- PII extraction
- Intellectual property leakage
- Unsafe code generation
- Policy bypass
- Misuse of legitimate features
Folio3 AI Security Testing Methodology
Framework | Coverage |
OWASP Top 10 for LLMs | Prompt injection, insecure output, poisoning, sensitive information disclosure, plugin risks and excessive agency |
MITRE ATLAS | Attack mapping across reconnaissance, access, exfiltration and impact |
NIST AI 100-2 | Evasion, poisoning, privacy and abuse classification |
Testing draws on NVIDIA Garak, Microsoft PyRIT, Lakera Red, Burp Suite with AI-specific extensions, custom prompt injection payloads, and proprietary Folio3 AI red team scripts.
Automated tools provide broad coverage, while human testers evaluate business logic, multi-stage attacks, permission boundaries, and real-world consequences.
Folio3 AI Security Assessment Deliverables
Executive Risk Report
A business-focused summary containing risk ratings, attack narratives, affected processes, and remediation priorities.
Technical Findings Report
Detailed documentation with proof-of-concept exploits, reproduction steps, technical evidence, and AI-focused risk scores.
MITRE ATLAS Attack Map
A visual mapping of discovered attack paths to relevant ATLAS tactics and techniques.
A prioritized plan covering architectural improvements, guardrail configurations, access controls, monitoring, and validation criteria.
Secure Your AI Before Attackers Test It
As AI applications gain access to increasingly sensitive data and higher-privilege business tools, the ability to query records, send communications, or execute code, a single prompt injection vulnerability changes from a nuisance into an exposure event. In a basic chatbot, that vulnerability produces an inappropriate response.
In an AI agent with tool access, the same vulnerability can retrieve confidential data, invoke a restricted API, or execute an unauthorized transaction. Folio3's AI & LLM Application Security Assessments identify these attack paths before deployment, using automated tooling such as Garak, PyRIT, and Lakera Red for baseline coverage and manual red teaming to test the business logic and permission boundaries automated scans miss.
Findings are mapped to the OWASP Top 10 for LLMs, MITRE ATLAS, and NIST AI 100-2, and every assessment concludes with a retest cycle to confirm remediation holds against attack variants, not just the original proof of concept.
Frequently Asked Questions
What are AI & LLM Application Security Assessments?
They evaluate vulnerabilities across AI models, prompts, RAG pipelines, agents, APIs, data sources, connected tools, and application workflows.
What is LLM red teaming?
LLM red teaming involves actively attacking an LLM-powered application to uncover prompt injection, jailbreak, data leakage, and tool-misuse weaknesses.
What is AI agent red teaming?
AI agent red teaming evaluates whether an agent can be manipulated into accessing restricted information, invoking unauthorized tools, or performing unsafe actions.
Can RAG applications leak confidential data?
Yes. Weak access controls, incorrect metadata filters, cross-tenant retrieval, and poisoned documents can expose confidential information.
No. Automated tools provide broad coverage, but human testers are needed to identify business logic flaws and complex attack paths.
When should an LLM security assessment be conducted?
Testing should be performed before production, after major model or architecture changes, when new tools or data sources are connected, and regularly for high-risk applications.