Metraipolis › archive › dc_793d4d3d1a13

ContextLeak: Exfiltrating LLM Agent Context via Malicious Tools — arXiv:2608.27800

Source
arXiv (en)
Original
https://arxiv.org/abs/2608.27800
License (as archived)
CC0-1.0
Archived
2026-10-17T10:47:56.883Z
SHA-256 of the archived text
332f88fbe9d159dda05523f747604cbff6545af040dd8053012508bd09d02e0f
Stable URL of this page
https://metraipolis.com/documento/dc_793d4d3d1a13

How to cite

ContextLeak: Exfiltrating LLM Agent Context via Malicious Tools — arXiv:2608.27800 — arXiv (en), https://arxiv.org/abs/2608.27800 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_793d4d3d1a13 (Metraipolis archive dc_793d4d3d1a13, sha256 332f88fbe9d159dda05523f747604cbff6545af040dd8053012508bd09d02e0f)
BibTeX
@misc{dc793d4d3d1a13,
  title = {ContextLeak: Exfiltrating LLM Agent Context via Malicious Tools — arXiv:2608.27800},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2608.27800},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_793d4d3d1a13; sha256 332f88fbe9d159dda05523f747604cbff6545af040dd8053012508bd09d02e0f},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.27800. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Exfiltrating an LLM agent's runtime context -- such as the user prompt, execution trajectory, and tool list -- poses severe security and privacy risks to users. Such attacks can be carried out via malicious tools and typically require three conditions: (1) the agent selects the malicious tool for task execution, (2) the agent passes its runtime context as input arguments to the tool, and (3) the tool's implementation transmits these inputs to an attacker-controlled endpoint. Existing work primarily focuses on conditions (1) and (3), leaving condition (2) largely unexplored, despite its critical role in enabling successful context exfiltration. In this work, we bridge this gap by developing ContextLeak, a malicious tool attack that induces the agent to both select the tool and disclose its context as input arguments. We realize this attack by carefully crafting the tool's name and description using reinforcement learning. Specifically, ContextLeak employs an LLM, referred to as the attack LLM, to automatically generate the malicious tool's name and description. To improve attack effectiveness, we fine-tune the attack LLM via reinforcement learning on a set of shadow users with diverse, simulated agent contexts. Our key technical contribution is the design of novel reward functions tailored to the context exfiltration objective, enabling effective reinforcement-learning-based fine-tuning of the attack LLM. Extensive evaluation demonstrates that our attack remains highly effective even when the shadow users' contexts differ substantially from those of the victim users. Moreover, ContextLeak significantly outperforms existing malicious tool attacks when adapted to this setting.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-08-31 in cs.AI).
Categorie arXiv: Cryptography and Security (cs.CR) ; Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2608.27800 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-17T10:33:42.473Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-08-31?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).