Prompt injection changes tool choice or tool arguments by planting instructions that the agent treats as higher priority than the user’s task, often because the model lacks a strict instruction hierarchy or tool schema enforcement. The failure mode is argument substitution, where the agent copies behaviour from attacker text into a tool call. Mitigations include allowlisted tools, typed arguments, and server-side validation.
How prompt injection steers tool choice and tool arguments
Tool selection changes when the injected text gives the agent an apparently relevant instruction that competes with the user’s task, especially if the model does not enforce a strict hierarchy between system, developer, and untrusted content. The practical effect is not just bad summarisation, but the model choosing a different tool, or the same tool with attacker-shaped inputs.
That happens because the model is trying to satisfy a blended instruction set rather than a sealed policy boundary. If the tool interface is loose, the injected text can look like a legitimate command, a parameter value, or a routing hint, so the model substitutes the attacker’s preference for the user’s intent.
When tools are typed, constrained, and validated server-side, the model has less room to improvise. The difference is important: prompt injection is not only about what the model says, but about whether the model can be induced to select a tool path that the surrounding application then executes.
Why argument substitution is the core failure mode
Argument substitution is the common pattern because the attack does not need to invent a brand-new action. It only needs to redirect an otherwise valid call, for example by swapping a recipient, changing a search query, widening a filter, or passing attacker-controlled content into a parameter that the tool will trust.
This is especially dangerous when the agent copies attacker phrasing into a tool call without reinterpreting it against the actual user request. In effect, the model becomes a translator for malicious instructions rather than a planner for the user’s task.
That failure mode is also why prompt injection can remain subtle in testing. The agent may still appear to follow the task, but the final tool arguments encode a different intent, which is harder to spot than a visibly wrong answer.
What reduces tool confusion in practice
Good defenses narrow the agent’s degrees of freedom before the model gets a chance to improvise. Allowlisted tools reduce which actions are even available, typed arguments reduce how much free-form text can be repurposed, and server-side validation gives the application a final chance to reject unsafe or inconsistent calls.
For agentic systems, the best published guidance is to treat tool access as a security boundary that needs explicit controls, not as a convenience layer. NHIMG’s Prompt Injection Guide is useful here because it breaks the problem down into direct and indirect attacks, hidden instructions, and layered defenses.
The same control logic shows up in the broader agentic risk model, where OWASP Agentic Applications Top 10 covers tool misuse and identity and privilege abuse as distinct failure classes. A practical takeaway is that the model should not be trusted to self-police its own tool routing.
For teams building against this class of issue, NHIMG’s OWASP LLM Top 10 LLM01 Prompt Injection Guide is the most directly relevant internal reference because it pairs the attack pattern with concrete mitigations and test scenarios.
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 OWASP API Security Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI02 — Tool Misuse | Prompt injection steers agent tool choice and arguments. |
| ASI03 — Identity & Privilege Abuse | Injected instructions can redirect privileged tool actions and payloads. | |
| Recommendation — Restrict tool access and validate every tool call against policy before execution. Scope agent privileges tightly and separate untrusted content from delegated authority. | ||
| OWASP API Security Top 10 | API5 — Broken Function Level Authorization | Tool calls can become unauthorized actions when the model can invoke them freely. |
| Recommendation — Enforce server-side authorization on every tool-exposed action. | ||
| NIST SP 800-53 Rev 5 | AC-3 — Access Enforcement | Tool choice and arguments need enforced policy, not model judgment alone. |
| IA-5 — Authenticator Management | Tool arguments may carry secrets or tokens that must be governed carefully. | |
| Recommendation — Apply access enforcement at the service boundary for every tool action. Protect and rotate credentials used by agents and tool integrations. | ||
Practitioner Guidance
What to verify: Verify that tool selection is constrained by policy, not only by model output. If the model can choose between tools based on untrusted text, you should assume prompt injection can steer it until proven otherwise.
Decision rule: If the agent can send free-form arguments to a powerful tool, enforce typed schemas and server-side checks before you trust the call. If the tool can move data, send messages, or trigger side effects, treat argument validation as mandatory rather than defensive hardening.
What practitioners underestimate: Many teams look for obviously malicious tool names, but the more common issue is quiet argument drift. The safest assumption is that any untrusted text reachable by the model may be reused as a parameter unless the application blocks that path.
Practitioner takeaway: The real control point is not whether the model “understands” the prompt injection, but whether the surrounding system prevents untrusted instructions from changing tool routing or tool payloads.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org