能力门控并非授权:LLM 代理框架中的混淆代理失败
Capability Gates Are Not Authorization: Confused-Deputy Failures in LLM Agent Frameworks
AI总结:
本文审计了 LangChain、LlamaIndex 和 Stripe Agent Toolkit 等框架,发现它们默认仅提供能力门控而非每次调用的值授权,导致混淆代理漏洞。作者提出 ScopeGate,一个五阶段授权框架,实验证明其能有效阻止未经授权的操作。
摘要:
使用工具的 LLM 代理越来越多地读取不受信任的内容,同时持有具有副作用的工具,如支付、电子邮件、CRM 和基础设施 API,然而常见的框架默认设置仍然将工具暴露与授权混为一谈。我们审计了 LangChain/LangGraph、LlamaIndex 和 Stripe Agent Toolkit 是否在每次模型发出的调用(带有具体参数值)执行前重新授权。在固定的公共源代码提交中,三者默认提供能力门控,但均未默认提供确定性的、失败关闭的每次调用值授权门控。我们引入了 ScopeGate,一个用于代理工具调用的五阶段 PDP/PEP:范围、授权、资金上限、幂等性和默认拒绝。评估显示,相同的未经授权的支付调用在 LangChain 的默认调度下执行(附带 LlamaIndex PoC),但被 ScopeGate 拒绝;测试的控制报告 0/48 静态绕过、0/29 未经授权的尝试(40 次迭代自适应运行)、0/10 良性错误拒绝,以及 Latam-GPT 支付代理在 10/10 时的遏制。ASR 表示尝试的未经授权操作,遏制并非治愈,部署层声明是对测量模型类别的推断,且未断言任何 CVE。
英文摘要:
Tool-using LLM agents increasingly read untrusted content while holding side-effecting tools such as payments, email, CRM, and infrastructure APIs, yet common framework defaults still conflate tool exposure with authorization. We audit whether LangChain/LangGraph, LlamaIndex, and the Stripe Agent Toolkit re-authorize each model-emitted call, with concrete argument values, before execution. Across pinned public-source commits, all three provide capability gating by default, but none provides a deterministic fail-closed per-call value authorization gate by default. We introduce ScopeGate, a five-stage PDP/PEP for agent tool calls: scope, authorization, money ceiling, idempotency, and default deny. Evaluation shows the identical unauthorized payout call executes under LangChain's default dispatch (with a companion LlamaIndex PoC) but is denied by ScopeGate; the tested control reports 0/48 static bypasses, 0/29 unauthorized attempts (40-iteration adaptive run), 0/10 benign false-denies, and Latam-GPT payment-agent containment at 10/10. ASR denotes attempted unauthorized action, containment is not a cure, deployment-tier claims are inference over measured model classes, and no CVE is asserted.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。