Manuscript Offprint

arXiv:2610.37415

The Envelope Layer: An Underestimated Surface of LLM Agent Defense

Yuelin Han

Yuelin Han

Abstract—Prior work framed the envelope layer as the channel through which malicious content enters an agent, and established it as a defense surface independent of the LLM layer and the agent layer; however, that work only tested the envelope layer briefly and did not examine how label strength, envelope authenticity, scaffold differences, or existing memories affect defense effectiveness. Following its GDA Measurement methodology and the A/B/C/D outcome taxonomy, this paper takes the A2A-TIBA attack as the test vehicle, uses the semantic breach rate as the primary indicator with the semantic refusal rate as its complementary reference, and characterizes the security boundary of the envelope layer through a two-by-two factorial experiment and a memory experiment. The results show that: when the envelope is authentic, strong labels consistently reduce the semantic breach rate, whereas weak labels are not necessarily better than an unlabeled baseline; when the envelope can be forged, the benefit of strong labels is weakened and its direction varies across frontends; and memory has a larger effect than any label manipulation: success memory raises the semantic breach rate while failure memory lowers it, and most combinations that contain both experiences return to the no-memory baseline. Accordingly, this paper refines the envelope layer from a single admission channel into two levels, an admission channel plus a context assembly surface, and argues that its security boundary is not a fixed property of labels but a dynamic outcome jointly shaped by label claims, frontend permissions, and historical memory.

Index Terms—LLM agent security; A2A protocol; envelope layer; context assembly; label strength; indirect prompt injection; memory

1 INTRODUCTION

A GENTS are moving from single-turn question answering toward long-horizon, multi-agent collaboration [1]. The A2A (Agent-to-Agent) protocol standardizes “one agent calling another” as message exchange: the caller sends a task description, the callee executes it within its own tools, files, and memory, and returns the result. For the receiver, a remote message is not ordinary text but a task carrying claims about provenance, role, and intent. The problem is that these claims live on the “envelope” of the message rather than in its content, and the receiver can decide “who said this, whether to believe it, and how much authority to grant” only from the envelope. Three years of prompt-injection research have shown that this boundary is fragile [2]–[7]. Defenses fall into two families: one isolates representations at the LLM layer—ranging from measurements of whether a model can separate instructions from data [8] to mechanisms such as spotlighting [9], instruction-hierarchy training [10], and structured queries [11]; the other confines privileges at the agent layer, e.g., capability-based data-flow isolation [12], programmable least-privilege control [13], and engineering controls such as tool allowlists, sensitive-file gates, sandboxes, and egress policies, whose effectiveness is usually evaluated with dynamic testbeds and benchmarks [4], [14]–[16]. Both families can work, but they fail differently: the former fails as “the model was persuaded,” the latter as “the model was persuaded and permissions did not stop it.” Collapsing both into a single attack success rate (ASR) hides which layer failed.

Based on whether malicious content is stopped at the LLM layer or at the agent layer, prior work [17] proposed the A/B/C/D outcome taxonomy, decomposing a single ASR into the semantic refusal rate, the semantic breach rate, the interception rate, and the penetration rate, and proposed the three-layer attack-defense model ELA-ITL along the "optimization dimensions of both sides": L1, the envelope layer, corresponds to the different channels through which malicious content enters an agent (A2A/ACP protocols, MCP tools, memory, etc.); L2, the LLM layer, to the backend model's ability to recognize malicious instructions; and L3, the agent layer, to the frontend's restrictions on dangerous actions. In this model the envelope layer is defined as the channel through which malicious content enters an agent, and is established for the first time as a defense surface independent of L2 and L3. A channel-ablation experiment in [17] on a 1,000-case corpus showed that attaching an "untrusted" label to a channel raises the LLM's semantic refusal rate. However, the label validation in [17] was mainly conducted on a single frontend, hermes, with the other frontends providing only unlabeled baselines; a single-factor design cannot, in principle, characterize the security boundary of the envelope layer. It cannot answer: when the attacker forges the envelope so that the message appears to come from the local user, does a strong label stop it or is it bypassed? When the same label is placed in different scaffolds' contexts, is the recognition rate the same? When memory already holds historical experience, is the label's effect dragged? These three questions jointly motivate this paper.

Following the GDA Measurement base and the A/B/C/D taxonomy of [17], this paper takes the A2A-TIBA attack as the test vehicle, reports the semantic breach rate (non-A share) as the primary indicator and the semantic refusal rate (A share) as the core reference, and characterizes the security boundary of the envelope layer through a 1,200-cell 2×2 factorial experiment and a 320-cell memory experiment. Under authentic envelopes (original skill), strong labels consistently lower the semantic breach rate in the same direction across the three frontends (reductions of 29.0 to 41.0 percentage points); however, weak labels are not necessarily better than the unlabeled baseline—on openclaw the semantic breach rate rises from 61% to 69% and the penetration rate from 35% to 49%, whereas on claude it falls from 66% to 42%. When the attacker forges the envelope, the boundary contracts markedly and its direction varies by frontend: claude's semantic breach rate rises from 13% to 52% (penetration rate 8%, the rest intercepted by the agent layer), hermes from 34% to 52% (penetration rate from 9% to 25%), and openclaw under a strong label instead falls from 28% to 23%. At the backend margin, forgery does not reverse the benefit of strong labels, but the gap for the same backend across frontends can reach 80 percentage points. In addition, existing historical memory exerts a pull that crosses the baseline: pooled over the four combinations, success memory raises the semantic breach rate to 81.2% (semantic refusal rate down to 18.8%) and failure memory lowers it to 6.2% (semantic refusal rate up to 93.8%); when both experiences coexist, most combinations are pulled back near the baseline (41.2%/43.8% vs. 40.0%), except the openclaw weak-label group, whose two conflict conditions (80%/90%) exceed its 55% baseline.

Based on these findings, this paper refines the definition of the envelope layer into two levels (see Fig. 1): it is not only the “admission channel” (L1a) through which data enters, but also the “context assembly surface” (L1b) between data entry and model reading, jointly assembled from the system prompt, skill declarations, message-role wrapping, and memory. The security boundary of the envelope layer is not a fixed property of labels but a dynamic outcome jointly shaped by components such as label claims, frontend permissions, and historical memory.

This paper makes four contributions: it introduces “envelope authenticity” as a new experimental factor and “memory valence” as an independent manipulation dimension on the GDA base, making the boundary estimable; it characterizes the baseline benefit under authentic envelopes and the shape of the boundary under frontend divergence with forged envelopes; it shows that historical memory, as a component of the envelope layer, affects the semantic refusal rate more strongly than labels themselves; and it refines the envelope layer from an admission channel into two levels, the admission channel and the context assembly surface, with an explicit attribution boundary—all manipulations in this paper fall within the assembly surface and the admission channel is held fixed, so the conclusions do not extrapolate to cryptographic authentication.

The remainder of this paper is organized as follows. Section 2 reviews related work. Section 3 presents the research design, including the capability boundaries of attackers and defenders (3.1), the A/B/C/D adjudication and statistical protocol (3.2), the 2×22 \times 2 factorial design (3.3), and the memory-condition design (3.4). Section 4 describes the testbed, the A2A channel, and the attack-chain implementation. Section 5 reports the main-experiment results (5.1, covering label strength, envelope forgery, and backend differences), the memory-experiment results (5.2), and the experimental conclusions (5.3), and then gives the definitional extension of the envelope layer that follows from the results in 5.4. Section 6 presents inferences and conjectures, the verifiability boundary of the envelope layer, and limitations. Section 7 concludes. Appendices A–D give the verbatim texts of labels and forged envelopes with their installation locations, the token cap for openclaw ×\times qwen3.8-max, the rationale for the memory combinations, and the execution time and token consumption of each combination.

References (31)