Join our Newsletter — 33% off our NHI Course
Home FAQ AI Security Why do custom LLM applications create more security…
AI Security

Why do custom LLM applications create more security risk than model-only testing usually reveals?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated September 9, 2026 Domain: AI Security

Custom LLM applications create more risk because the attack surface extends beyond text generation. RAG pipelines can leak protected data, agents can misuse tools, and integrations can be manipulated through parameter tampering or multi-turn escalation. Model-only checks miss these system-level behaviors, so organisations need testing that mirrors how the application actually retrieves data, executes actions, and handles state.

Why Model-Only Evaluation Misses the Real Exposure

Custom LLM applications are riskier than model-only testing suggests because the model is only one component of the system. Once retrieval, orchestration, tools, memory, and external APIs are added, the security question changes from “what can the model say?” to “what can the application do with what the model says?” That shift matters because the dangerous failures often sit in the glue layer, not in the base model.

As the NIST AI Risk Management Framework makes clear, AI risk has to be handled across the full lifecycle and system context, not only at the model interface. A model may pass prompt-level checks while the surrounding application still leaks data, misroutes instructions, or executes unsafe actions. In practice, many security teams discover those failures only after the application has already been wired into real data sources and tool permissions, rather than during isolated model testing.

How Application Components Expand the Attack Surface

Model-only testing tends to focus on outputs, refusal behavior, and obvious prompt injection. Custom applications introduce additional control points that create different failure modes. Retrieval-augmented generation can expose sensitive content if document permissions, chunking, or query filters are weak. Tool use can turn a harmless-looking instruction into an external action. Session state and conversation memory can let an attacker shape later responses through earlier turns. These are system behaviours, not model behaviours, which is why a model can appear safe while the application remains exploitable.

The practical issue is that security testing has to follow the data and action path end to end. That means checking how inputs are parsed, what context is retrieved, which tools are callable, what authorisation gates exist, and whether the application validates intent before acting. It also means assuming that a user can influence the prompt indirectly through retrieved content, files, web pages, or prior conversation turns. When those paths are present, the important question is not whether the model “knows better,” but whether the application will still carry out the wrong instruction.

The distinction becomes even sharper when the app interacts with production systems. A model that cannot directly exfiltrate data still becomes dangerous if it can persuade an orchestration layer to call a connector, send a message, or mutate a record. That is why framework-led reviews for agentic applications now look beyond prompt safety and into tool permissions, workflow boundaries, and trust assumptions. The OWASP Top 10 for Agentic Applications 2026 is useful here because it forces attention onto application behaviour, not just model behaviour.

Model-only testing breaks down whenever the application can retrieve, store, or execute information in ways the base model test never observes.

Where the Risk Changes in Practice

Tighter application control often increases development and testing overhead, so teams have to balance speed against the cost of validating real workflows. The standard answer holds for simple chat interfaces, but it becomes incomplete once the LLM can touch data, tools, or state.

  • RAG changes the problem from language generation to data access control. A well-behaved model can still surface content it should not have seen if retrieval is mis-scoped.
  • Agents change the problem from recommendation to execution. A safe answer can still lead to unsafe action if tool permissions are too broad or poorly checked.
  • Multi-turn interactions change the problem from one-shot prompts to stateful influence. An attacker can shape later behaviour without needing a single obviously malicious message.
  • Parameter tampering changes the problem from user intent to system trust. If hidden fields, tool arguments, or routing values are not validated, the model may act on manipulated context.

That is why the right comparison is not “model testing versus application testing” in the abstract. It is “isolated generation testing versus full workflow assurance.” For AI systems that are orchestrating tools or making use of privileged data, the MITRE ATLAS adversarial AI threat matrix helps teams think in terms of attack path, abuse of trust, and downstream compromise. Where the app remains a simple text interface with no retrieval, memory, or actions, the security gap is narrower. Once those capabilities appear, the gap widens quickly and model-only checks are no longer enough.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 and MITRE ATLAS address the attack and risk surface, while NIST AI RMF, NIST AI 600-1 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST AI RMFMAP — MapFrames AI risk across the full application lifecycle and system context.
Recommendation — Map the full LLM application lifecycle, not just model outputs, to identify system-level risk.
NIST AI 600-1GenAI profile — Generative AI ProfileAddresses generative AI risks in deployed application settings.
Recommendation — Apply the generative AI profile to test retrieval, orchestration, and tool-use risks in deployment.
OWASP Agentic AI Top 10A1 — Tool Misuse and Unsafe ActionsDirectly covers agentic applications that can misuse tools or execute unsafe actions.
Recommendation — Constrain tool permissions and validate action intent before any model-driven execution.
MITRE ATLASATLAS — Adversarial Threat Tactics, Techniques and Knowledge BaseHelps model attack paths against AI-enabled systems and their surrounding workflow.
Recommendation — Use ATLAS to map abuse paths that exploit retrieval, state, or orchestration weaknesses.
NIST CSF 2.0PR.AC-3 — Remote AccessSupports access control around connected AI application components and data paths.
Recommendation — Enforce access boundaries on connectors, data sources, and privileged application actions.

Practitioner Guidance

What to prioritise: Test the retrieval path, the tool path, and the state path before you trust model scores. If the application can read, write, or trigger anything outside the model, that external behaviour is the control boundary that matters most.

What to verify: Confirm that retrieved content is scoped by the same access rules as the source system, that tool calls are authorised independently of model output, and that hidden parameters or conversation state cannot be altered to change downstream actions. If any one of those checks is missing, treat the application as untrusted even if the model appears robust.

What practitioners underestimate: The easiest way for a custom LLM application to fail is not a dramatic jailbreak but a routine business workflow that quietly turns model output into action. The most important judgement is to test whether the system can be safely wrong, not just whether the model can be safely prompted.

Deepen Your Knowledge

Sign up to our weekly newsletter — get 33% off our NHI Foundation Level Course

    NHIMG Editorial Note
    Reviewed and updated by the NHIMG editorial team on September 9, 2026.
    NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org