Manuscript Offprint

arXiv:2609.31039

MetaPermit: Scalable and Auditable Access Control for AI Agents via LLM-Inferred Meta-Attributes

Hanzhang Ma, Ali Hariri, Tianxiang Shen, Bohua Zou, Qianjun Zheng, Ji Wang, Li Yi, Ning Jia, Yutao Liu, Haibo Chen, Lin Wang, Debayan Roy

Abstract

The rise of autonomous AI agents equipped with tools has introduced significant security risks, ranging from unintended tool misuse to adversarial manipulation through Indirect Prompt Injection (IPI) attacks. In practice, deployed agent systems such as OpenAI Codex and Claude Code protect tool invocations through a combination of coarse-grained permission rules and LLM-based judgments about individual proposed actions. Both components, however, have important limitations: static policies must anticipate possible user intents and therefore do not scale to open-ended tasks, while Large Language Model (LLM)-driven authorization supports dynamic decisions but produces inconsistent outcomes and remains vulnerable to targeted IPI attacks. To provide scalable and more consistent authorization, we propose MetaPermit, a policy-based tool access-control framework that decouples semantic inference from security enforcement. By analyzing agent-user interactions, we derive a compact, task-independent set of meta-attributes that capture the relationships among the user's intent, the execution context, and the proposed tool call. These meta-attributes allow MetaPermit to authorize tool use without enumerating user intents. At runtime, an LLM infers the meta-attribute values for each proposed tool call, while a fixed policy evaluates these values to allow or deny the call, making each decision auditable through the inferred values and the applied policy rule. We evaluate MetaPermit on the AgentDojo and AgentDyn benchmarks, across seven task suites and five attack methods, using two widely deployed open-weight LLMs. The results show that MetaPermit produces 31% more consistent authorization decisions than LLM-driven authorization and outperforms the state-of-the-art defenses CaMeL and IPIGuard in both task completion, with improvements of up to 109%, and robustness to IPI attacks, with no malicious tool calls executed.

1 Introduction

LLM applications have evolved from chatbots into autonomous agents. They plan over long horizons, use multiple tools, and increasingly carry out extended action sequences without human confirmation at every step (Yao et al. 2023; Schick et al. 2023; Xi et al. 2023; Wang et al. 2024). Acting in the world, however, requires agents to treat the world as input. To be useful, an agent must read inboxes, web pages, shared documents, and outputs from third-party services—content that is neither written by the developer nor reviewed by the user (Deng et al. 2023; Bandel, Yehudai, and Shmueli-Scheuer 2026; Debenedetti et al. 2024). Because instructions and data arrive through the same channel, adversarial text embedded in such content enters the same context window as the user's request and may be followed as though it came from the user (Greshake et al. 2023; Liu et al. 2024; Zhan et al. 2024; Perez and Ribeiro 2022).

To prevent an agent from acting beyond what the user requested, current systems place an authorization check at each tool call—the point through which every consequential action must pass. Existing defenses fall into two categories. (1) The first approach keeps enforcement deterministic by writing a static policy per tool or intent before runtime, then mapping each prompt to one of those intents (Gong et al. 2026; Sharma and Grossman 2026). Policies are predictable but numerous, and an intent not anticipated during design has no matching policy. (2) The second delegates the decision to a dedicated security LLM that authorizes each proposed tool invocation. Deployed systems such as OpenAI Codex and Claude Code combine coarse permission rules with this form of model-based judgment (OpenAI 2025; Anthropic 2025). This approach does not require user requests to be enumerated in advance, but it may produce inconsistent verdicts for nearly identical tasks (Ouyang et al. 2025).

Consider a motivating example in which Alice asks her agent to refund Bob an overpayment of 1,500.WhilecheckingAlice’stransactionhistory,theagentencountersatransactionfromEve,anattacker,containinganotethatimpersonatesAliceandinstructstheagenttotransfer1,500. While checking Alice’s transaction history, the agent encounters a transaction from Eve, an attacker, containing a note that impersonates Alice and instructs the agent to transfer1,500 to Eve. An undefended agent may follow this instruction if its underlying model fails to recognize the IPI attack. A well-crafted IPI could similarly manipulate an LLM judge into authorizing the transfer. Tool-level static policies cannot distinguish between the legitimate transfer to Bob and the malicious transfer to Eve without requiring recipient-specific rules for every legitimate payee.

In this paper, we introduce MetaPermit, a hybrid access-control framework that combines static policies with LLM-inferred meta-attributes.

(1) Rather than predicting explicit user intents, MetaPermit captures abstract, context-dependent security dimensions of an interaction, which we call meta-attributes. Unlike conventional access-control attributes that describe individual entities or system state, meta-attributes characterize semantic relationships among the user request, proposed tool invocation, and surrounding context. For example, intent_tool_alignment indicates whether the user's intent is consistent with the invoked tool without requiring the intent itself to be identified. Meta-attributes and their possible values are predefined and used as decision factors in a compact set of general policies. A policy may, for instance, deny a tool invocation when intent_tool_alignment is misaligned. Because both the inferred meta-attribute values and the policy rule producing the decision are explicit, each authorization decision can be inspected and audited. This abstraction enables a small number of policies to cover diverse and previously unseen intents while ensuring scalable and consistent enforcement.

(2) MetaPermit uses LLMs to infer meta-attribute values from the AI agent's interactions. This dynamic inference enables MetaPermit to adapt to diverse contexts without relying on an LLM for the final authorization decision. Unlike direct LLM-driven authorization, bypassing MetaPermit requires manipulating all meta-attributes needed to satisfy an allow rule. Our experiments show that prompt injections often affect only a subset of these meta-attributes. Some meta-attributes can also be inferred using only trusted inputs. For example, intent_is_action meta-attribute depends only on the user's prompt, so retrieved content cannot influence its value.

Thus, MetaPermit uses LLMs only to infer bounded meta-attributes, while static policies retain control over authorization decisions. Its meta-attribute schema can be extended or refined for each deployment without modifying the underlying access-control architecture or enumerating user intents.

In addition to meta-attributes, MetaPermit includes a policy-feedback mechanism that informs the agent of the denial reason or specifies the required next action. This guides the agent toward fulfilling the user's intent securely, rather than leaving it with an unexplained denial.

We evaluated MetaPermit against three baselines on the AgentDojo and AgentDyn benchmarks, which assess utility and security across seven task scenarios and five prompt-injection attacks. Utility is the fraction of fulfilled user tasks, while security is the fraction of failed prompt injection attacks. Compared with state-of-the-art defense frameworks, MetaPermit improves utility by up to 109% and reduces the attack success rate from as high as 3.14% to 0%. It also provides 31% more consistent authorization decisions than a direct LLM guard.

References (23)