cd /news/ai-safety/what-s-in-your-agent-s-context-conte… · home topics ai-safety article
[ARTICLE · art-118679] src=arxiv.org ↗ pub= topic=ai-safety verified=true sentiment=↓ negative

What's in Your Agent's Context? Context Privilege Escalation Attacks Against AI

A new study from arXiv presents the first systematic analysis of context assembly designs in real-world AI agent harnesses, identifying two novel attack categories—MessageRole Context Privilege Escalation (M-CPE) and Cross-Scope Context Privilege Escalation (X-CPE)—that can lead to full agent compromise, remote code execution, denial of service, and manipulated tool or skill invocations. The researchers tested these attacks against 12 real-world agent harnesses, including Claude Code and Codex.

read2 min views2 publishedSep 2, 2026
What's in Your Agent's Context? Context Privilege Escalation Attacks Against AI
Image: source
[Submitted on 1 Sep 2026]


[View PDF](/pdf/2609.01222)

[HTML (experimental)](https://arxiv.org/html/2609.01222v1)

Abstract:Real-world, high-profile AI agent harnesses often rely on vendor-proprietary or opaque designs for context assembly, leaving the sources and underlying logic of assembled context poorly understood and the resulting security risks largely unexplored. In this paper, we present the first systematic analysis of context assembly designs in real-world AI agent harnesses. We study and uncover how an agent harness is designed to collect and assemble context from diverse sources, and identify a set of practical attack vectors arising from these designs. Our analysis brings to light two novel categories of attacks in the context assembly of real-world harnesses: (1) MessageRole Context Privilege Escalation (M-CPE), which occurs when attacker-controlled content originating from a low-privileged context is incorporated into a higher-privileged message role. (2) Cross-Scope Context Privilege Escalation (X-CPE), which occurs when attacker-controlled content persists beyond the context in which it was introduced. We performed a systemic security analysis of the CPE attacks against 12 real-world agent harnesses, including Claude Code and Codex. The resulting consequences include full agent compromise, remote code execution, denial of service, and manipulated tool or skill invocations, etc.

References & Citations

...

Bibliographic Explorer

(What is the Explorer?) Connected Papers

(What is Connected Papers?) Litmaps

(What is Litmaps?) scite Smart Citations

(What are Smart Citations?)# Code, Data and Media Associated with this Article alphaXiv

(What is alphaXiv?) CatalyzeX Code Finder for Papers

(What is CatalyzeX?) DagsHub

(What is DagsHub?) Gotit.pub

(What is GotitPub?) Hugging Face

(What is Huggingface?) ScienceCast

(What is ScienceCast?)# Demos Influence Flower

(What are Influence Flowers?) CORE Recommender

(What is CORE?)# arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

── more in #ai-safety 4 stories · sorted by recency
── more on @arxiv 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/what-s-in-your-agent…] indexed:0 read:2min 2026-09-02 ·