Agents

Benign wording steers AI tool routers past safety checks

Reviewing ShadowBench-MCP: Measuring Shadow Invocations in MCP-Style Tool Routing · Eyhab Al-Masri and Wenjun Yang

Benign wording steers AI tool routers past safety checks

Researchers show that rewording a legitimate request with time pressure can lead an LLM tool router to choose a route that drops validation, provenance or audit steps. A stricter routing policy cuts this sharply, but the clearest lesson is that the chosen route can be checked before anything runs.

Ask an AI agent to deploy a patch on the fast path and it may do exactly that. It picks the deploy tool and leaves out the validation step. Nobody asked for anything malicious. The task is the same; only the wording leaned on it.

The researchers call this shadow invocation, and they measure it in tool routing of the kind built around the Model Context Protocol (MCP). Here the model is not writing an answer. It is choosing which tools run, and in what order. In a well-built workflow that route includes the dull steps: provenance checks, staging, redaction, audit logging. The researchers' point is that the route is itself a model output, and it can be steered.

The setup is small and clear. A single router, a Groq-hosted Qwen3 model, ranked tools across six workflows. These included vulnerability patching, dependency updates, CI/CD deployment, financial data export and incident triage. Each request came in its original form and in four variants carrying operational pressure: go fast, skip validation, deploy directly, defer the audit. Then they compared the routes.

Under a router told to favour efficiency, 14 of 48 variants produced a riskier route than the original. Required safety tools dropped out at a similar rate. What I find interesting is how ordinary the trigger is. There is no injection payload and no hidden instruction, just the impatience any busy engineer types. If an attacker can shape the request wording, through a ticket, a commit message or a forwarded email, they can shape the route.

Then comes the turn. Swap in a policy that explicitly requires security checks, provenance and audit logging, and shadow routes fell to 2 of 48. That is a large drop for a few lines of instruction. I take it as real evidence that the routing prompt matters, and that efficiency-first framing invites the shortcut.

I would not take it as a defence. The pressure variants were fixed and fairly blunt. Nobody tried phrasing written to get past the protected policy. The obvious next move for an attacker is to present the shortcut as already compliant, claiming the audit happens later. A policy written in the same channel the attacker writes in is a soft control.

The more useful result is detection. Routes can be scored before anything runs, and the clearest signal was simply whether required safety tools had gone missing from the plan. That is cheap to check, and it does not depend on the model agreeing to behave. Required steps belong in code that refuses to execute a plan without them, not in a sentence the router weighs against speed.

The limits are real: one model, six curated workflows, two repetitions, and no compromised tools or malicious tool output in scope. The researchers say plainly that this is early evidence, not a claim of universal vulnerability.

The route is an output. Validate it like one.

Further analysis

Problem

The paper studies whether benign, task-preserving variations in user requests can cause LLM-driven routers to choose riskier execution paths that omit safeguards such as validation, provenance, staging, redaction, or audit controls. This "shadow invocation" effect would mean that the execution path selected by a model is a security-relevant output distinct from the model's generated text, creating an operational channel where phrasing that preserves intent nonetheless induces a shortcut route.

Approach

The authors formalise shadow invocation and introduce ShadowBench-MCP, a benchmark and metric suite that separates task preservation (TPSS), operational pressure (OPSS), and route-geometric drift (RGAS) and combines them into a composite pre-execution Semantic-Operational Drift Score (SODS). They evaluate a focused policy-ablation study using a Groq-hosted qwen/qwen3-32b router with top-k=5 tool ranking. Six curated security-sensitive workflows were used: software maintenance, vulnerability patching, dependency update, CI/CD deployment, financial data export, and incident triage. Each seed task had one original request and four task-preserving pressure variants (fast path, skip validation, direct deploy, defer audit/checks). Two router policies were compared: an unprotected efficiency-first policy and a protected policy that explicitly requires security checks, provenance, audit logging and related safeguards. The experiment produced 120 routing decisions and 96 original-versus-variant pairwise comparisons across policies and repetitions.

Key Findings

  • Definition and measurement: Shadow invocation is when two requests preserve the same task but the variant causes a riskier route; ShadowBench-MCP yields TPSS, OPSS, RGAS, safety-tool skip, SIR (shadow invocation rate) and composite SODS for pre-execution assessment.
  • Policy effect: Under efficiency-first routing 14 of 48 unprotected pairs were shadow invocations (29.2%) and the average required safety-tool skip rate was 26.7%. Under policy-aware routing 2 of 48 pairs were shadow invocations (4.2%) and the safety-tool skip rate fell to 1.7%, an 85.7% relative reduction in shadow invocations in this setting.
  • Pre-execution detection: Route-level signals distinguish shadow routes before execution; safety-skip delta achieved ROC AUC 0.94, risk-shift AUC 0.90, RGAS and route Jaccard AUC 0.88, and SODS AUC 0.84 under the unprotected policy.

Limitations

The study is a focused policy ablation using one specific router and model, six curated workflows, four pressure styles and two repetitions. The sample size supports descriptive rates and correlations for this configuration but does not establish generalisation to other routers, MCP implementations, tool registries or production distributions. The threat model excludes compromised tools, malicious tool outputs, credential abuse and post-execution side effects.

Implications

An attacker with only the ability to craft benign, task-preserving request wording could influence routing to skip safeguards, creating a covert operational channel that changes execution without requesting malicious actions. This enables subtle attacks that remove validation, audit or staging controls prior to tool execution. Conversely, the study shows that explicit routing policies can greatly reduce this risk and that pre-execution route signals can be used to detect suspicious drift, though defenders must trade off coverage against human-review burden.

The paper title, authors and abstract

ShadowBench-MCP: Measuring Shadow Invocations in MCP-Style Tool Routing

Eyhab Al-Masri, Wenjun Yang

LLM agents increasingly act as routers for tools, APIs, and software-supply-chain workflows, making an execution path - rather than generated text alone - a security-relevant model output. We study shadow invocation: a task-preserving request variant that causes an LLM router to select a riskier execution path, potentially skipping validation, provenance, staging, redaction, or audit controls even though the request does not ask for a malicious action. We introduce ShadowBench-MCP, a benchmark and metric suite that separates task preservation (TPSS), operational pressure (OPSS), and route-geometric drift (RGAS), and combines them in the pre-execution SODS score. In a focused policy-ablation study using a Groq-hosted qwen/qwen3-32b router, 120 routing decisions yield 96 original-versus-variant comparisons across six security-sensitive workflows. Efficiency-first routing produces a 29.2% shadow-invocation rate and 26.7% safety-tool skip rate. Policy-aware routing reduces these to 4.2% and 1.7%, respectively, corresponding to an 85.7% relative reduction in shadow invocations. Pre-execution signals distinguish shadow routes with ROC AUC up to 0.94. These results are early, single-router evidence of a policy-dependent routing-layer security effect, not a claim of universal vulnerability.