PolicySniff: Inferring Agent Policy States through Shared-GPU Execution

Weimin Fu, Minghao Shao, Zeng Wang, Qiying Li, Yuntao Liu, Johann Knechtel, Ozgur Sinanoglu, Muhammad Shafique, Ramesh Karri, Xiaolong GuoarXiv 2026

TL;DR

PolicySniff is a novel side-channel attack that reveals the hidden security settings of LLM agents—such as whether they are instructed to "ask for permission" before taking an action—by simply timing GPU execution from a neighboring process. By exploiting the routing behavior of Mixture-of-Experts (MoE) models, the attack achieves over 94% accuracy in identifying a policy state, even when the agent's final response remains identical under different settings.

What Problem Does This Paper Address?

LLM agents are increasingly used to perform consequential tasks like modifying files or executing code. To keep them safe, developers use "approval policies"—instructions hidden in the system prompt that tell the agent when to seek human confirmation. While these prompts are kept confidential to prevent attackers from crafting "jailbreaks," the authors of this paper ask a critical question: Does the physical execution of the model itself leak these secret settings?

Current security audits focus on whether an agent obeys its rules. PolicySniff shifts the focus to configuration confidentiality. It addresses the risk that a co-resident attacker (someone sharing the same GPU hardware in a cloud environment) could infer these private settings without ever seeing the agent's input or output.

Methods

The attack targets Sparse Mixture-of-Experts (MoE) architectures, which are common in modern high-performance models (like Mixtral or Qwen). In these models, only a few "experts" (specialized sub-networks) are activated for each token.

The core mechanism of PolicySniff relies on two key observations:

  1. Contextual Influence: Even if the policy instructions are already processed and stored in the "KV cache," they still influence the internal hidden states of subsequent task tokens.
  2. Routing Leakage: In MoE models, these hidden states determine which experts are selected. If the model is running on an "eager" runtime that dispatches experts as separate work units, the specific sequence and timing of these activations become a signature.

The Attack Flow: * Profiling: The attacker, knowing the candidate policies and the task, profiles both settings on their own GPU instance to create reference timing signatures. * Observation: A "neighboring process" (the attacker) launches its own small GPU kernels repeatedly. By timing how long its own kernels take to run, it can infer when the victim's process is hogging the GPU resources. * Inference: The attacker compares the observed timing trace to their reference profiles to identify which policy is active.

Figure 1. Policy-state inference outside the response interface. (a) Service access restrictions withhold the configuration and action response from the neighbor. (b) Task execution remains conditioned on the cached policy context; the neighbor times its own kernels. Expert counts are schematic. (c) Blinded NF4 campaign in the agent’s GPU instance: each column is a task, gray segments span its two reference means, and filled circles and squares show the permissive and protected target groups; open markers denote misclassified groups, and values are offset by the task midpoint. The decoder classified 47/48 groups correctly.

Datasets

The researchers evaluated PolicySniff using several synthetic agent environments:

  • Coding-Agent Workloads: Tasks involving fixture repair, build recovery, and workspace management in software repositories.
  • Synthetic Action Schema: A benchmark of 120 scenario clusters across six operation families (e.g., file deletion, credential access, network calls) evaluated under five different authorization conditions.
  • Models: The primary evaluations were performed on Qwen3-30B-A3B-Instruct (using both BF16 and 4-bit NF4 quantization) and gpt-oss-120b for detailed routing analysis.

Key Insights and Ideas

  • The "Identical Output" Leak: Perhaps the most surprising finding is that the attack works even when the agent's visible behavior is the same. For example, if an agent is asked to delete a file and refuses under both "Strict" and "Permissive" policies, the internal routing used to reach that refusal still leaks which policy was in place.
  • MoE as a Side-Channel Vector: The efficiency of sparse MoE models—only running what is needed—is exactly what creates the timing variance that PolicySniff exploits.
  • Hardware-Level Signatures: Through hardware replays, the authors proved that the policy information is carried in the temporal density (how bursts of activity happen over time) and the layer-and-bucket alignment of expert routing.
  • Policy Placement Matters: The authors demonstrate that moving the policy check out of the LLM prompt and into a "trusted broker" (an external piece of code that mediates actions) effectively suppresses the timing signal.

Key Results

  • High Accuracy: In a blinded study on an NVIDIA A100 GPU, PolicySniff identified the deployed policy with 94.17% balanced accuracy.
  • Robustness: The attack maintained 88.82% accuracy on tasks where both policies resulted in the same final decision.
  • Observation Cost: While continuous probing is highly accurate, it slows down the victim's execution by about 4.7x. However, by adding a 1ms idle interval between probes, the attacker can still achieve 94.79% accuracy with a much lower 2.96x slowdown, making the attack harder to detect.

Limitations and Future Work

  • Co-residency Requirement: The attack currently requires the attacker to share a physical GPU or a Multi-Instance GPU (MIG) instance with the victim.
  • Known Candidates: The threat model assumes the attacker knows the potential policy settings (e.g., they know the agent is either in "auto mode" or "manual mode").
  • Runtime Specificity: The attack was demonstrated on "eager" runtimes. The authors note that "fused" runtimes, which batch expert kernels together, might provide a natural defense by smoothing out the timing signatures.
  • Future Directions: The authors suggest that future work should investigate more complex multi-tenant environments and develop "constant-slot padding" techniques for MoE runtimes to mitigate these leaks without massive performance hits.

Summary updated

Abstract

LLM agents apply approval settings, such as whether to ask before a consequential tool call, through instructions in their system prompt, and operators keep these settings confidential by restricting access to prompts and responses. Audits check whether an agent obeys its setting, not whether a neighboring process can infer which setting is deployed. PolicySniff infers an agent's approval-policy state through shared-GPU execution. A co-resident attacker that knows the candidate settings and the task first profiles both settings, then times only its own GPU kernels while the agent processes the task. The policy prefix is cached before capture, so the attacker observes processing of a task suffix that is identical under both settings. On an eager sparse mixture-of-experts runtime, where each selected expert runs as separate work, a frozen and blinded study identified the deployed setting at 94.17% balanced accuracy on its primary estimand. Across all authorization conditions, accuracy was 88.82% on tasks for which both settings produce the same decision and 91.98% on tasks where they differ. Hardware replays of expert routing show that its temporal density and layer-and-bucket alignment carry the policy information. Behavioral compliance does not imply configuration confidentiality: deployments that keep their approval setting private should measure its distinguishability on the serving runtime and enforce authorization outside the model.
BibTeX
@misc{fu2026policysniff,
  author = {Weimin Fu and Minghao Shao and Zeng Wang and Qiying Li and Yuntao Liu and Johann Knechtel and Ozgur Sinanoglu and Muhammad Shafique and Ramesh Karri and Xiaolong Guo},
  title = {{PolicySniff: Inferring Agent Policy States through Shared-GPU Execution}},
  year = {2026},
  eprint = {2611.16158},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.16158},
}
Figure