SudoBench: A Contextual Authorization Benchmark for LLM Agents
Abstract
LLM agents act for users on content that other parties wrote. To act correctly, an agent must know who gave an instruction and what that party may do. However, the OpenClaw-lineage agent runtimes that we audit check only whether a message may reach the agent and pass each instruction to the model as plain text, so the model makes almost every authorization decision with insufficient evidence. We present SudoBench, a benchmark of 135 paired scenarios in three attack families: confused deputy, source-label indirect prompt injection, and scope-check indirect prompt injection. In each pair, one runtime field changes, and the same request must be executed in one half and refused in the other. A pair passes only if the model is correct on both halves. Across ten frontier LLMs, models fail in both directions. Without authorization context, they carry out both halves of 55\% of pairs, and joint pass is 5.8\%. With a source label on each tool result and a list of the user's capabilities, joint pass rises to 49\%, but models still fail 37\% of authorized requests. An oracle that blocks every unauthorized call raises joint pass only to 63\%, because it cannot make the model complete an authorized action. Authorization checks belong in the harness, and failures on authorized requests are an open problem for models.