Researchers propose context privilege escalation attack, affecting 12 agent frameworksWhat's in Your Agent's Context? Context Privilege Escalation Attacks against AI Agent Harness
Translation in progress — untranslated text is omitted.
Researchers at the University of Illinois Urbana-Champaign conducted a systematic security analysis of the context assembly mechanisms of 12 mainstream AI agent frameworks, proposing two new classes of context privilege escalation attacks: message role privilege escalation (M-CPE), where content from low-privilege sources enters high-privilege message roles, and cross-scope privilege escalation (X-CPE), where attacker content persists into sources with broader scope. The study covers Codex, Claude Code, OpenClaw, Gemini CLI, Qwen Code, Kimi CLI, Aider, OpenCode, Cline, Goose, Pi-mono, and Hermes Agent, identifies 16 attack vectors, and develops an automated analysis tool, CoRA, reporting 282 vulnerable context sources. Proof-of-concept attacks succeed end-to-end on GPT-5.5, GPT-5.4-mini, and DeepSeek-V4-Flash, with consequences including full agent control, remote code execution, denial of service, and manipulation of tool or skill calls.
- The context assembly mechanism and sources of real AI agent harnesses lack transparency and have design flaws. Attackers can exploit this to induce low-privilege content into high-privilege roles or expand persistent scopes, leading to security risks such as remote code execution, privilege escalation, or manipulation of execution results.
- Formally model the role and scope hierarchy of agent context, propose two attack types—message role privilege escalation and cross-scope privilege escalation—and 16 attack vectors. Develop the automated tool CORA, which extracts context sources via static analysis, instruments runtime validation of roles and scopes, and validates end-to-end attack paths through two rounds of execution in isolated environments.
- Verified 282 context sources and 1761 CPE candidate paths across 12 agent harnesses. Under GPT-5.5, 1315 paths were successfully loaded into high-privilege sources (74%), 1034 achieved behavior verification (58%), and end-to-end PoC attacks were achieved on all 12 agents.
- CORA environment construction is limited by complex configurations and dynamic sources, and the LLM may fail to execute instructions due to safety alignment. End-to-end exploitation is affected by the randomness of the agent's autonomous tool invocation; vendors not publishing context manifests hinders defense analysis. The experiments tested 12 open-source harnesses and did not report the success rate of multi-turn interactions in real deployment environments.
The paper systematically reviews the context assembly design of 12 mainstream agent frameworks, presents two types of privilege escalation attacks and 16 attack vectors, and teams deploying agents can use this to inspect their own context sources and role assignments.
Related events and news
0 events · 1 news mentions
News that mentions this paper
- Promptfoo LM Security DBcites the paper's id or linkAI Agent harness 中的上下文权限提升