Join our Newsletter — 33% off our NHI Course
Home› FAQ› AI Security› How should security teams implement guardrails for LLM…
AI Security

How should security teams implement guardrails for LLM applications to reduce prompt injection and excessive agency risks?

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

Start by limiting what the model can do, not just what it can say. Constrain tools, permissions, and external actions to the smallest necessary scope, then validate inputs and outputs before they reach downstream systems. Add human approval for sensitive actions, isolate untrusted content, and red team the application so indirect prompts do not turn into unauthorized execution.

Guardrails for LLM Apps: What They Actually Need to Constrain

Guardrails work best when they constrain the application, not just the model text. That means limiting tool access, permission scope, retrieval scope, and outward-facing actions so the model cannot turn a bad prompt into a real-world side effect. In practice, the guardrail boundary should sit around the action surface, not only around generated language.

For teams building enterprise copilots, the most useful starting point is to separate “can answer” from “can act.” An LLM can be allowed to draft, classify, summarise, or suggest while still being blocked from making changes, sending messages, approving transactions, or calling sensitive APIs without an explicit control point. AI Guardrails and AI Firewalls Guide is a useful reference for patterns such as input filtering, output filtering, and tool-call checks.

That separation matters because prompt injection often succeeds by changing the model’s intent, while excessive agency succeeds by giving the model too much authority. If the model can only operate inside narrowly defined tool scopes, with strong allowlists and policy checks around each action, then indirect prompts are less likely to become unauthorized execution. Enterprise AI Copilot Security Guide covers this boundary between over-sharing and over-action in practical deployment terms.

Where Prompt Injection Becomes an Agency Problem

Prompt injection is not only a content problem. It becomes a security issue when untrusted input is allowed to influence tool selection, retrieval, or downstream side effects. A malicious instruction hidden in email, documents, web pages, chat history, or retrieved context can steer the model toward actions the user never intended.

The risk grows when the application treats model output as if it were trusted reasoning. If retrieved content, user content, or third-party content can alter policy decisions, the application needs a trust boundary between untrusted text and executable instructions. The safest pattern is to keep untrusted content readable to the model but non-authoritative for decisions, especially when the result can touch data stores, tickets, external systems, or communications channels.

This is the same failure pattern seen in real incidents where indirect prompts triggered data leakage or agent misuse. EchoLeak (Microsoft 365 Copilot) 2025 and ForcedLeak (Salesforce Agentforce) 2025 both illustrate how injected instructions can cross from text manipulation into unauthorized disclosure when the surrounding controls are too permissive.

When you design the guardrail, treat every untrusted channel as potentially adversarial: inbound messages, documents, retrieved passages, tickets, web pages, and even user-uploaded files. The model may still read them, but the application must decide what is allowed to influence execution, what must be ignored, and what must be escalated for review.

Designing Approval, Isolation, and Review Points That Hold Up

Strong guardrails add friction where the blast radius is highest. That usually means human approval for sensitive actions, sandboxing for untrusted content, and hard separation between the model’s context and privileged execution paths. If the action can expose data, move money, alter records, or send messages outside the immediate chat, it deserves an approval gate or at least a scoped policy check.

Isolating untrusted content is equally important. Keep retrieved documents, external web content, and user attachments in a lower-trust zone, and do not let them directly shape system instructions, policy overrides, or tool arguments. Reducing excessive agency is often less about a single filter and more about making sure the model never has enough authority to act on a poisoned instruction without another control point noticing.

That is why Agentic AI Security Guide is relevant for teams building tool-using systems, because it frames inputs, memory, tools, orchestration, and identity as separate control surfaces. For teams wanting a formal risk lens, OWASP Agentic AI Top 10 is useful for mapping guardrails to risks such as tool misuse, identity and privilege abuse, and agent hijacking.

Risk and Threat Considerations

Prompt injection becomes materially dangerous when the application lets untrusted text influence privileged actions, because the attacker is no longer trying to “hack the model” in the abstract, they are trying to turn the model into a proxy for execution. Excessive agency increases that risk by giving the model access to tools, data, or workflows that exceed the immediate user request.

Failure mechanism: An adversary places instructions in content the model will process, then relies on weak trust boundaries, broad tool permissions, or missing approval steps to convert those instructions into data exposure or unauthorized action.

Impact: The result can be disclosure of sensitive information, unauthorized external actions, policy bypass, or harmful changes made at machine speed before a human notices.

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 addresses the attack and risk surface, while NIST AI RMF and OWASP ASVS set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseLLM guardrails must prevent model-driven privilege overreach.
ASI02 — Tool MisusePrompt injection often turns into unsafe or unintended tool calls.
ASI01 — Agent Goal HijackInjected instructions can redirect an agent away from the user’s intended goal.
Recommendation — Restrict agent permissions and require approval for privileged tool use. Constrain tool access and validate every tool invocation against policy. Detect goal drift and block instruction sources that try to override system intent.
NIST AI RMFMAP — Measure, Analyze, and ManageGuardrails for LLM apps require ongoing testing and managed risk decisions.
Recommendation — Measure guardrail failures and manage residual risk through documented review.
OWASP ASVSV4 — API and Web ServiceLLM apps often expose APIs and actions that need authorization and input checks.
Recommendation — Apply API authorization and request validation to every model-connected endpoint.

Practitioner Guidance

What to prioritise: Start with action containment, not prompt polishing. The highest-value control is to narrow tool scope, outbound integrations, and write permissions so the model cannot perform sensitive actions by default.

What to verify: Confirm that sensitive requests require a separate approval path, and test whether injected instructions can still reach tool arguments, routing logic, or retrieval decisions. If they can, the guardrail is too shallow.

What practitioners underestimate: Many teams focus on blocking unsafe text outputs while leaving the action surface open. For LLM applications, the harder problem is not what the model says, but what the surrounding system lets it do.

Practitioner takeaway: A useful guardrail strategy treats the LLM as an untrusted decision support component, then constrains authority, isolates untrusted input, and adds review at the exact points where text becomes action.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

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